Page 1 sur 1

PHP Fatal error CI

Posté : 01 août 2016, 11:14
par sime
Bonjour tout le monde,

J'ai un projet que on ma donnée en PHP et que je dois mettre en place dans un système d'intégration continue (Sous Linux) mai j'ai 2/3 problème dont un gros que je vous fait parvenir et avec le quelle je requière votre aide :)

On ma donnée ces commandes à exécuter :
composer install --no-dev --optimize-autoloader
Sur celle la j'ai des warning .

Code : Tout sélectionner

Do not run Composer as root/super user! See https://getcomposer.org/root for details 01-Aug-2016 09:04:15 Loading composer repositories with package information 01-Aug-2016 09:04:16 Updating dependencies 01-Aug-2016 09:04:36 Package dflydev/markdown is abandoned, you should avoid using it. Use michelf/php-markdown instead. 01-Aug-2016 09:04:36 Writing lock file 01-Aug-2016 09:04:36 Generating optimized autoload files 01-Aug-2016 09:04:37 Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\GenericEvent" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/GenericEvent.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/GenericEvent.php", the first will be used. 01-Aug-2016 09:04:37 Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\Debug\WrappedListener" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/WrappedListener.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php", the first will be used. 01-Aug-2016 09:04:37 Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php", the first will be used. 01-Aug-2016 09:04:37 Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcherInterface.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcherInterface.php", the first will be used. 01-Aug-2016 09:04:37 Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\ImmutableEventDispatcher" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php", the first will be used. 01-Aug-2016 09:04:37 Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\EventSubscriberInterface" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventSubscriberInterface.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php", the first will be used. 01-Aug-2016 09:04:37 Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\EventDispatcherInterface" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcherInterface.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php", the first will be used. 01-Aug-2016 09:04:37 Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\Event" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Event.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Event.php", the first will be used. 01-Aug-2016 09:04:37 Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php", the first will be used. 01-Aug-2016 09:04:37 Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\EventDispatcher" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php", the first will be used. 01-Aug-2016 09:04:37 Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php", the first will be used. 01-Aug-2016 09:04:39 > Incenteev\ParameterHandler\ScriptHandler::buildParameters 01-Aug-2016 09:04:39 Updating the "app/config/parameters.yml" file.
php app/console doctrine:schema:update --force
Ici j'ai une erreur :

Code : Tout sélectionner

PHP Fatal error: Class 'Misd\GuzzleBundle\MisdGuzzleBundle' not found in /home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/AppKernel.php on line 24
php app/console ca:c --env=prod --no-debug
et ensuite je n'ai jamais pu testée celle la.

Voila et c'est avec le PHP Fatal error... que je bloque, j'ai fait beaucoup de recherche dessus mai je n'ai rien trouvé de satisfaisant.

Merci d'avance

Re: PHP Fatal error CI

Posté : 01 août 2016, 11:29
par moogli
salut,

Ceci me semble important, c'est même un truc général ce genre d'outils ne doit pas tourner en root. D'ailleurs les esclaves de l'IC (ni même le maitre) ne devrait tourner en root.
Do not run Composer as root/super user! See https://getcomposer.org/root for details

pour le reste php ne trouve pas la classe, c'est donc que soit l'autoloader construit par composeur est foireux soit les dépendences ne sont pas charger correcttement.
est ce que le fichier *MisdGuzzleBundle* existe dans un sous répertoire de /home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/

Cela n'a jamais fonctionné ? (même pas une fois ?).
Je pense qu'il faut commencer par résoudre les problèmes indiqués par composer pour avancer (les conflit sont peut être la source de ton problème).

@+

Re: PHP Fatal error CI

Posté : 01 août 2016, 15:01
par yann18
sur la doc sf2(C: Install/Update your Vendors)
, ils recommandent d'exporter d'abord la variable d'environnement export SYMFONY_ENV=prod avant de lancer ta 1ere commande.Tu trouveras une explication pourquoi tes packages qui sont en version de dev ne sont pas installés dans un environnement de prod

Re: PHP Fatal error CI

Posté : 01 août 2016, 15:27
par sime
Hello,

Merci pour ta réponse rapide :)

moogli En ce qui concerne l’exécution en root je ne pense pas que sa pose de problème :
Si je ne mais pas le root (il ne peux pas le lire puisse que c'est le soft de CI (Bamboo Atlassian) qui clone le dépôt en root !) :

01-Aug-2016 12:38:40 Loading composer repositories with package information
01-Aug-2016 12:38:40 Updating dependencies
01-Aug-2016 12:39:08
01-Aug-2016 12:39:08
01-Aug-2016 12:39:08 [ErrorException]
01-Aug-2016 12:39:08 file_put_contents(/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/composer/installed.json): failed to open stream: Permission denied
01-Aug-2016 12:39:08
01-Aug-2016 12:39:08
01-Aug-2016 12:39:08 install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...

Si tu à une solution pour ça je suis preneur autrement je le réglerais un peux plus tard.

Pour PHP ERROR je n'ai aucun fichier "*MisdGuzzleBundle*"

Et le fichier autoload.php (/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/autoload.php) est quasiment vide (Es-ce celui-la don tu me parle ?) :

<?php
// autoload.php @generated by Composer
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit0e6d939778aa2eefa9f25ef754bacc68::getLoader();

En se qui concerne les dépendances comment puis-je savoir si elle son chargé correctement ?

Ensuite, cela fonctionne sur un autre PC où je n'ai pas l’accès mais sans Bamboo et avec les commande que on ma donner.

Pour ce qui est des conflits, je les ai laisser parce que je ne c'est pas comment les résoudre, je ne vois pas ce qu'il veux me dire et ou il se trouve...
Si tu peux me donnée un indice je t'en serai reconnaissant :)

J'ai tester ce que tu à dit yann18 sa ne règle pas l'erreur mai sa avance peux être...
au lieux de l'erreur à la ligne 24 j'ai ça :

PHP Warning: require_once(/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/bootstrap.php.cache): failed to open stream: No such file or directory in /home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/console on line 10
01-Aug-2016 13:14:33 PHP Fatal error: require_once(): Failed opening required '/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/bootstrap.php.cache' (include_path='.:/usr/share/php:/usr/share/pear') in /home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/console on line 10

Re: PHP Fatal error CI

Posté : 01 août 2016, 18:32
par yann18
PHP Warning: require_once(/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/bootstrap.php.cache): failed to open stream: No such file or directory in /home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/console on line 10
01-Aug-2016 13:14:33 PHP Fatal error: require_once(): Failed opening required '/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/bootstrap.php.cache' (include_path='.:/usr/share/php:/usr/share/pear') in /home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/console on line 10
il faut régénérer un nouveau fichier de cache bootstrap.Pour ce faire, dans les scripts d'installation de composer.json.Par exemple dans le fichier composer.json de sf3, on ajoute un script init-bootstrap-cmd(ce nom est arbitraire):
"scripts": {
       "init-bootstrap-cmd": [
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache"
    ]
    },
on exécute ensuite la régéneration de bootstrap + nettoyage du cache( app/cache)
composer run-script init-bootstrap-cmd
Une fois le nouveau fichier bootstrap régénéré, tu peux lancer ta 1ère commande pour optimiser l'auto-chargement des classes.

Re: PHP Fatal error CI

Posté : 02 août 2016, 11:51
par sime
Salut,

Voila quand je fait la commande composer run-script init-bootstrap-cmd j'ai des erreur :
Do not run Composer as root/super user! See https://getcomposer.org/root for details
02-Aug-2016 09:25:51 	Deprecation Notice: The callback Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap declared at /home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/ScriptHandler.php accepts a Composer\Script\CommandEvent but init-bootstrap-cmd events use a Composer\Script\Event instance. Please adjust your type hint accordingly, see https://getcomposer.org/doc/articles/scripts.md#event-classes in phar:///bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:289
02-Aug-2016 09:25:51 	> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
02-Aug-2016 09:25:51 	Deprecation Notice: The callback Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache declared at /home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/ScriptHandler.php accepts a Composer\Script\CommandEvent but init-bootstrap-cmd events use a Composer\Script\Event instance. Please adjust your type hint accordingly, see https://getcomposer.org/doc/articles/scripts.md#event-classes in phar:///bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:289
02-Aug-2016 09:25:51 	> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
02-Aug-2016 09:25:51 	PHP Fatal error:  Class 'Misd\GuzzleBundle\MisdGuzzleBundle' not found in /home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/AppKernel.php on line 23
02-Aug-2016 09:25:51 	Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the init-bootstrap-cmd event terminated with an exception
02-Aug-2016 09:25:51 	
02-Aug-2016 09:25:51 	                                                                             
02-Aug-2016 09:25:51 	  [RuntimeException]                                                         
02-Aug-2016 09:25:51 	  An error occurred when executing the "'cache:clear --no-warmup'" command. 
02-Aug-2016 09:25:51 	                                                                             
02-Aug-2016 09:25:51 	
02-Aug-2016 09:25:51 	run-script [--timeout TIMEOUT] [--dev] [--no-dev] [-l|--list] [--] [<script>] [<args>]...
Je vous fourni le fichier composer.json :
{
    "name": "Bealder/api",
    "license": "MIT",
    "type": "project",
    "description": "Api for Bealder",
    "autoload": {
        "psr-0": { "": "src/" }
    },
    "require": {
        "php": ">=5.4.3",
        "symfony/symfony": "2.8.*",
        "doctrine/orm": ">=2.2,<2.5-dev",
        "doctrine/doctrine-bundle": "1.2.*",
        "twig/extensions": "1.0.*",
        "symfony/assetic-bundle": "2.5.*",
        "symfony/swiftmailer-bundle": "2.3.*",
        "symfony/monolog-bundle": "2.5.*",
        "symfony/event-dispatcher": "2.5.*",
        "sensio/distribution-bundle": "2.3.*",
        "sensio/framework-extra-bundle": "2.2.*",
        "sensio/generator-bundle": "2.5.*",
        "friendsofsymfony/rest-bundle": "1.7.*",
        "friendsofsymfony/elastica-bundle": "3.1.*",
        "nelmio/api-doc-bundle": "2.4.*",
        "nelmio/cors-bundle": "1.3.*",
        "incenteev/composer-parameter-handler": "2.0.*",
        "gedmo/doctrine-extensions": "2.4.*",
        "jms/serializer-bundle": "1.0.*",
        "nc/faye-client": "1.1.*",
        "mapado/mysql-doctrine-functions": "1.*"
    },
    "require-dev": {
        "phpunit/phpunit": "4.5.*"
    },
    "scripts": {
        "post-install-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters"
        ],
        "post-update-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters"
        ],
        "init-bootstrap-cmd": [
                "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
                "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "minimum-stability": "stable",
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        }
    }
}

Re: PHP Fatal error CI

Posté : 02 août 2016, 14:10
par yann18
la classe MisdGuzzleBundle n'est pas présente dans le fichier d'autoload. Depuis la console,tu régénères l'autoload:
composer dump-autoload
Si ça ne marche toujours pas, il te faudra alors supprimer le dossier vendor (ou le sauvergarder hors du projet) puis mettre à jour les dépendances en faisant composer update

Re: PHP Fatal error CI

Posté : 02 août 2016, 16:35
par sime
Bonjour,

Yann18 en effet :) comment faire pour rajouter MisdGuzzleBundle ?
j'ai essayer de le rajouter dans require comme les autres mai quand je fait un composer install il ne trouve aucune version à télécharger pour MisdGuzzleBundle.

Je viens de pensée que j'ai rajouter "$loader = require __DIR__.'/autoload.php';" dans /home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/AppKernel.php, est-ce que des probleme pourais venir de la ?

Bon j'ai tout enlevé ce que j'avais mis dans le mon script précédant.

Donc maintenant je fait :
- composer update
- composer install --no-dev --optimize-autoloader
- composer dump-autoload
- php app/console doctrine:schema:update --force

build	02-Aug-2016 14:21:30	STEP 1 #######################################################
build	02-Aug-2016 14:21:30	composer update
error	02-Aug-2016 14:21:30	Do not run Composer as root/super user! See https://getcomposer.org/root for details
error	02-Aug-2016 14:21:30	Loading composer repositories with package information
error	02-Aug-2016 14:21:30	Updating dependencies (including require-dev)
error	02-Aug-2016 14:21:50	  - Installing sebastian/version (1.0.6)
error	02-Aug-2016 14:21:50	    Loading from cache
error	02-Aug-2016 14:21:50	
error	02-Aug-2016 14:21:50	  - Installing sebastian/global-state (1.1.1)
error	02-Aug-2016 14:21:50	    Loading from cache
error	02-Aug-2016 14:21:50	
error	02-Aug-2016 14:21:50	  - Installing sebastian/recursion-context (1.0.2)
error	02-Aug-2016 14:21:50	    Loading from cache
error	02-Aug-2016 14:21:50	
error	02-Aug-2016 14:21:50	  - Installing sebastian/exporter (1.2.2)
error	02-Aug-2016 14:21:50	    Loading from cache
error	02-Aug-2016 14:21:51	
error	02-Aug-2016 14:21:51	  - Installing sebastian/environment (1.3.7)
error	02-Aug-2016 14:21:51	    Loading from cache
error	02-Aug-2016 14:21:51	
error	02-Aug-2016 14:21:51	  - Installing sebastian/diff (1.4.1)
error	02-Aug-2016 14:21:51	    Loading from cache
error	02-Aug-2016 14:21:51	
error	02-Aug-2016 14:21:51	  - Installing sebastian/comparator (1.2.0)
error	02-Aug-2016 14:21:51	    Loading from cache
error	02-Aug-2016 14:21:51	
error	02-Aug-2016 14:21:51	  - Installing phpunit/php-text-template (1.2.1)
error	02-Aug-2016 14:21:51	    Loading from cache
error	02-Aug-2016 14:21:51	
error	02-Aug-2016 14:21:51	  - Installing phpunit/phpunit-mock-objects (2.3.8)
error	02-Aug-2016 14:21:51	    Loading from cache
error	02-Aug-2016 14:21:51	
error	02-Aug-2016 14:21:51	  - Installing phpunit/php-timer (1.0.8)
error	02-Aug-2016 14:21:51	    Loading from cache
error	02-Aug-2016 14:21:51	
error	02-Aug-2016 14:21:51	  - Installing phpunit/php-file-iterator (1.3.4)
error	02-Aug-2016 14:21:51	    Loading from cache
error	02-Aug-2016 14:21:51	
error	02-Aug-2016 14:21:51	  - Installing phpunit/php-token-stream (1.4.8)
error	02-Aug-2016 14:21:51	    Loading from cache
error	02-Aug-2016 14:21:51	
error	02-Aug-2016 14:21:51	  - Installing phpunit/php-code-coverage (2.2.4)
error	02-Aug-2016 14:21:51	    Loading from cache
error	02-Aug-2016 14:21:51	
error	02-Aug-2016 14:21:51	  - Installing webmozart/assert (1.0.2)
error	02-Aug-2016 14:21:51	    Loading from cache
error	02-Aug-2016 14:21:51	
error	02-Aug-2016 14:21:51	  - Installing phpdocumentor/reflection-common (1.0)
error	02-Aug-2016 14:21:51	    Loading from cache
error	02-Aug-2016 14:21:51	
error	02-Aug-2016 14:21:51	  - Installing phpdocumentor/type-resolver (0.2)
error	02-Aug-2016 14:21:51	    Loading from cache
error	02-Aug-2016 14:21:51	
error	02-Aug-2016 14:21:51	  - Installing phpdocumentor/reflection-docblock (3.1.0)
error	02-Aug-2016 14:21:51	    Loading from cache
error	02-Aug-2016 14:21:51	
error	02-Aug-2016 14:21:51	  - Installing phpspec/prophecy (v1.6.1)
error	02-Aug-2016 14:21:51	    Loading from cache
error	02-Aug-2016 14:21:51	
error	02-Aug-2016 14:21:51	  - Installing phpunit/phpunit (4.5.1)
error	02-Aug-2016 14:21:51	    Loading from cache
error	02-Aug-2016 14:21:52	
error	02-Aug-2016 14:21:53	sebastian/global-state suggests installing ext-uopz (*)
error	02-Aug-2016 14:21:53	phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1)
error	02-Aug-2016 14:21:53	phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
error	02-Aug-2016 14:21:53	Package dflydev/markdown is abandoned, you should avoid using it. Use michelf/php-markdown instead.
error	02-Aug-2016 14:21:53	Writing lock file
error	02-Aug-2016 14:21:53	Generating autoload files
error	02-Aug-2016 14:21:53	> Incenteev\ParameterHandler\ScriptHandler::buildParameters
build	02-Aug-2016 14:21:53	Updating the "app/config/parameters.yml" file.
build	02-Aug-2016 14:21:54	STEP 2 #######################################################
build	02-Aug-2016 14:21:54	composer install --no-dev --optimize-autoloader
error	02-Aug-2016 14:21:54	Do not run Composer as root/super user! See https://getcomposer.org/root for details
error	02-Aug-2016 14:21:54	Loading composer repositories with package information
error	02-Aug-2016 14:21:54	Installing dependencies from lock file
error	02-Aug-2016 14:21:54	  - Removing phpunit/phpunit (4.5.1)
error	02-Aug-2016 14:21:54	  - Removing phpspec/prophecy (v1.6.1)
error	02-Aug-2016 14:21:54	  - Removing phpdocumentor/reflection-docblock (3.1.0)
error	02-Aug-2016 14:21:54	  - Removing phpdocumentor/type-resolver (0.2)
error	02-Aug-2016 14:21:54	  - Removing phpdocumentor/reflection-common (1.0)
error	02-Aug-2016 14:21:54	  - Removing webmozart/assert (1.0.2)
error	02-Aug-2016 14:21:54	  - Removing phpunit/php-code-coverage (2.2.4)
error	02-Aug-2016 14:21:54	  - Removing phpunit/php-token-stream (1.4.8)
error	02-Aug-2016 14:21:54	  - Removing phpunit/php-file-iterator (1.3.4)
error	02-Aug-2016 14:21:54	  - Removing phpunit/php-timer (1.0.8)
error	02-Aug-2016 14:21:54	  - Removing phpunit/phpunit-mock-objects (2.3.8)
error	02-Aug-2016 14:21:54	  - Removing phpunit/php-text-template (1.2.1)
error	02-Aug-2016 14:21:54	  - Removing sebastian/comparator (1.2.0)
error	02-Aug-2016 14:21:54	  - Removing sebastian/diff (1.4.1)
error	02-Aug-2016 14:21:54	  - Removing sebastian/environment (1.3.7)
error	02-Aug-2016 14:21:54	  - Removing sebastian/exporter (1.2.2)
error	02-Aug-2016 14:21:54	  - Removing sebastian/recursion-context (1.0.2)
error	02-Aug-2016 14:21:54	  - Removing sebastian/global-state (1.1.1)
error	02-Aug-2016 14:21:54	  - Removing sebastian/version (1.0.6)
error	02-Aug-2016 14:21:54	Package dflydev/markdown is abandoned, you should avoid using it. Use michelf/php-markdown instead.
error	02-Aug-2016 14:21:54	Generating optimized autoload files
error	02-Aug-2016 14:21:55	Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\GenericEvent" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/GenericEvent.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/GenericEvent.php", the first will be used.
error	02-Aug-2016 14:21:55	Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\Debug\WrappedListener" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/WrappedListener.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php", the first will be used.
error	02-Aug-2016 14:21:55	Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php", the first will be used.
error	02-Aug-2016 14:21:55	Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcherInterface.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcherInterface.php", the first will be used.
error	02-Aug-2016 14:21:55	Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\ImmutableEventDispatcher" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php", the first will be used.
error	02-Aug-2016 14:21:55	Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\EventSubscriberInterface" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventSubscriberInterface.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php", the first will be used.
error	02-Aug-2016 14:21:55	Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\EventDispatcherInterface" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcherInterface.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php", the first will be used.
error	02-Aug-2016 14:21:55	Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\Event" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Event.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Event.php", the first will be used.
error	02-Aug-2016 14:21:55	Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php", the first will be used.
error	02-Aug-2016 14:21:55	Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\EventDispatcher" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php", the first will be used.
error	02-Aug-2016 14:21:55	Warning: Ambiguous class resolution, "Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher" was found in both "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php" and "/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php", the first will be used.
error	02-Aug-2016 14:21:56	> Incenteev\ParameterHandler\ScriptHandler::buildParameters
build	02-Aug-2016 14:21:56	Updating the "app/config/parameters.yml" file.
build	02-Aug-2016 14:21:57	STEP 3 #######################################################
build	02-Aug-2016 14:21:57	composer dump-autoload
error	02-Aug-2016 14:21:57	Do not run Composer as root/super user! See https://getcomposer.org/root for details
error	02-Aug-2016 14:21:57	Generating autoload files
build	02-Aug-2016 14:21:57	STEP 5 #######################################################
build	02-Aug-2016 14:21:57	php app/console doctrine:schema:update --force
error	02-Aug-2016 14:21:57	PHP Warning:  require_once(/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/bootstrap.php.cache): failed to open stream: No such file or directory in /home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/console on line 10
error	02-Aug-2016 14:21:57	PHP Fatal error:  require_once(): Failed opening required '/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/bootstrap.php.cache' (include_path='.:/usr/share/php:/usr/share/pear') in /home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/console on line 10
build	02-Aug-2016 14:21:57	#######################################################
Donc j'ai toujours les warning avec le install mai l'erreur change quand je fait php app/console doctrine:schema:update --force
PHP Warning:  require_once(/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/bootstrap.php.cache): failed to open stream: No such file or directory in /home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/console on line 10
PHP Fatal error:  require_once(): Failed opening required '/home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/bootstrap.php.cache' (include_path='.:/usr/share/php:/usr/share/pear') in /home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/console on line 10
Voici le fichier PHP en question :
<?php
require_once __DIR__.'/bootstrap.php.cache';
require_once __DIR__.'/AppKernel.php';

use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Input\ArrayInput;

use Symfony\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand;
use Symfony\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand;

$kernel = new AppKernel('test', true); // create a "test" kernel
$kernel->boot();

$application = new Application($kernel);

// add the database:drop command to the application and run it
/*$command = new DropDatabaseDoctrineCommand();
$application->add($command);
$input = new ArrayInput(array(
    'command' => 'doctrine:database:drop',
    '--force' => true,
));
$command->run($input, new ConsoleOutput());

// add the database:create command to the application and run it
$command = new CreateDatabaseDoctrineCommand();
$application->add($command);
$input = new ArrayInput(array(
    'command' => 'doctrine:database:create',
));
$command->run($input, new ConsoleOutput());*/
Voilà j’espère que quelqu’un de plus compétent que moi comprendra pourquoi je n'ai pas se fichier .cache.

N’hésiter pas si vous voulez plus de renseignement

Re: PHP Fatal error CI

Posté : 03 août 2016, 11:51
par yann18
Yann18 en effet :) comment faire pour rajouter MisdGuzzleBundle ?
j'ai essayer de le rajouter dans require comme les autres mai quand je fait un composer install il ne trouve aucune version à télécharger pour MisdGuzzleBundle.

Je viens de pensée que j'ai rajouter "$loader = require __DIR__.'/autoload.php';" dans /home/admin/bamboo/xml-data/build-dir/PHPAP-BEAL-JOB1/app/AppKernel.php, est-ce que des probleme pourais venir de la ?
non on ne fait pas de require dans un projet sf2 ou tout autre projet à base de composer car toutes les dépendances, y compris tes propres classes, sont gérées par composer ( section autoload).
L'exemple suivant montre que toutes les classes incluses dans le répertoire src seront chargées dans le fichier d'autoload de composer qui lui même sera chargé par symfony
"autoload": {
        "psr-0": { "": "src/" }
    }
Ainsi ta classe MisdGuzzleBundle située dans le répertoire src/Misd/GuzzleBundle est icluse directement dans l'autoload.
L'erreur rencontrée laisse à penser que MisdGuzzleBundle n'est pas dans le src

Re: PHP Fatal error CI

Posté : 03 août 2016, 16:21
par sime
En effet je n'ai rien dans src qui correspond.

Comment puis je l'ajouter ?