propelorm / PropelAclBundle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Autoload issue

lionelbzv opened this issue · comments

Hi,
I'm starting a fresh new SF2.8 project w. Propel & ACL, and I'm having problem including this bundle. It seems the autoloader has not include the path to the PropelAclBundle: I don't know where to fix this problem.

PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Fatal error: Class 'Propel\Bundle\PropelAclBundle\PropelAclBundle' not found

here is my composer.json:

{
    (...)
    "autoload": {
        "psr-4": {
            "": "src/"
        },
        "classmap": [
            "app/AppKernel.php",
            "app/AppCache.php"
        ]
    },
    "repositories": {
        "PropelAclBundle": {
            "type": "package",
            "package": {
                "name": "propel/propel-acl-bundle",
                "version": "master",
                "source": {
                    "url": "https://github.com/propelorm/PropelAclBundle.git",
                    "type": "git",
                    "reference": "1.5"
                },
               "autoload": {
                    "psr-4": { "Propel\\Bundle\\PropelAclBundle\\": "" }
                }
            }
        }
    },
    "require": {
        "php": ">=5.3.9",

        "symfony/symfony": "2.8.*",

        "symfony/assetic-bundle": "~2.3",
        "symfony/swiftmailer-bundle": "~2.3",
        "symfony/monolog-bundle": "~2.4",

        "propel/propel-bundle": "1.5.x@dev",
        "propel/propel-acl-bundle": "dev-master",

        "sensio/distribution-bundle": "~5.0",
        "sensio/framework-extra-bundle": "^3.0.2",
        "incenteev/composer-parameter-handler": "~2.0"
    },
    "require-dev": {
        "sensio/generator-bundle": "~3.0",
        "symfony/phpunit-bridge": "~2.7"
    },
    (...)
}

Thanks for helping!
BTW, why don't put this bundle in packagist?

sorry, I had not see the doc update, so it seems I've just to wait a little bit to have a "classic" composer require installation to do.

Hey,

it's not official yet, composer etc. is still not registered. In the meantime, you can go with this patch (based on havvg/symfony-propel-edition):

diff --git a/composer.json b/composer.json
index 48a7454..7351b6c 100644
--- a/composer.json
+++ b/composer.json
@@ -11,6 +11,7 @@
         "php": ">=5.3.9",
         "symfony/symfony": "^2.8.2",
         "propel/propel-bundle": "1.5.x@dev",
+        "propel/propel-acl-bundle": "1.5.x@dev",
         "symfony/swiftmailer-bundle": "~2.3",
         "symfony/monolog-bundle": "~2.4",
         "sensio/distribution-bundle": "~5.0",
@@ -55,5 +56,10 @@
         "branch-alias": {
             "dev-master": "2.8-dev"
         }
-    }
+    },
+
+    "repositories": [{
+        "type": "vcs",
+        "url": "https://github.com/propelorm/PropelAclBundle.git"
+    }]
 }

Ping @marcj Could you enable Travis CI and Packagist for the PropelAclBundle, please?
In Addition I would like to move the havvg/symfony-propel-edition to @propelorm, too. If you create such repository (also with Travis & Packagist :)), I will move it over.

@Lionel09 The PropelAclBundle is now set up on packagist. composer require propel/propel-acl-bundle:1.5.x@dev is now working.

 composer require propel/propel-acl-bundle:1.5.x@dev --prefer-source
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing symfony/security-acl (v3.0.0)
    Cloning 053b49bf4aa333a392c83296855989bcf88ddad1

  - Installing propel/propel-acl-bundle (1.5.x-dev 089cd41)
    Cloning 089cd419c2a846e099c633fd8b58acdc260f6c73

symfony/security-acl suggests installing doctrine/dbal (For using the built-in ACL implementation)
Writing lock file
Generating autoload files
Changelogs summary:

 - symfony/security-acl installed in version v3.0.0
   Release notes: https://github.com/symfony/security-acl/releases/tag/v3.0.0

 - propel/propel-acl-bundle installed in version 1.5.x-dev

Thanks!