ERROR Class "User" doesn't exist; please enter an existing full class name. (Symfony) - symfony

I'm a noob and my english is very bad but I will try to explain my problem.
I started a new side-project to train in Symfony.
I install multiple composer like : profiler, maker, orm, template...
The first problem :
The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue.
I solved it with changed the serverVersion into .env.local by : ?serverVersion=10.4.11-MariaDB
The second problem is when I make a Class User with command lign :
php bin/console make:entity User
it's ok but when I want make:auth or make:registrationForm he ask me enter the User class, what I do, and I have always the same error:
[ERROR] Class "User" doesn't exist; please enter an existing full class name.
My command lign looks like:
updated: src/Entity/User.php
Add another property? Enter the property name (or press <return> to stop adding fields):
>
Success!
Next: When you're ready, create a migration with php bin/console make:migration
frede#DESKTOP-M7PFMDG /c/xampp/htdocs/side_project/01-rpg_builder (registration)
λ php bin/console make:migration
Success!
Next: Review the new migration "migrations/Version20200625073423.php"
Then: Run the migration with php bin/console doctrine:migrations:migrate
See https://symfony.com/doc/current/bundles/DoctrineMigrationsBundle/index.html
frede#DESKTOP-M7PFMDG /c/xampp/htdocs/side_project/01-rpg_builder (registration)
λ php bin/console doctrine:migrations:migrate
WARNING! You are about to execute a database migration that could result in schema changes and data loss. Are you sure you wish to continue? (yes/no) [yes]:
>
[notice] Migrating up to DoctrineMigrations\Version20200625073423
[notice] finished in 91.2ms, used 18M memory, 1 migrations executed, 1 sql queries
frede#DESKTOP-M7PFMDG /c/xampp/htdocs/side_project/01-rpg_builder (registration)
λ php bin/console make:auth
What style of authentication do you want? [Empty authenticator]:
[0] Empty authenticator
[1] Login form authenticator
> 1
1
The class name of the authenticator to create (e.g. AppCustomAuthenticator):
> AppAuthenticator
Choose a name for the controller class (e.g. SecurityController) [SecurityController]:
>
Enter the User class that you want to authenticate (e.g. App\Entity\User) []:
> User
[ERROR] Class "User" doesn't exist; please enter an existing full class name.
I have never had this kind of problem before. I think it's since update doctrine-migrations-bundle "2.1.2" to "3.0.1"
composer.json:
{
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.2.5",
"ext-ctype": "*",
"ext-iconv": "*",
"sensio/framework-extra-bundle": "^5.5",
"symfony/asset": "5.1.*",
"symfony/console": "5.1.*",
"symfony/dotenv": "5.1.*",
"symfony/flex": "^1.8",
"symfony/framework-bundle": "5.1.*",
"symfony/orm-pack": "^1.0",
"symfony/profiler-pack": "^1.0",
"symfony/security-bundle": "5.1.*",
"symfony/twig-pack": "^1.0",
"symfony/validator": "5.1.*",
"symfony/yaml": "5.1.*"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.3",
"symfony/maker-bundle": "^1.19"
},
"config": {
"optimize-autoloader": true,
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"paragonie/random_compat": "2.*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php72": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"#auto-scripts"
],
"post-update-cmd": [
"#auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "5.1.*"
}
}
}
doctrine_migrations.yaml:
doctrine_migrations:
migrations_paths:
# namespace is arbitrary but should be different from App\Migrations
# as migrations classes should NOT be autoloaded
'DoctrineMigrations': '%kernel.project_dir%/migrations'
doctrine.yaml
doctrine:
dbal:
url: '%env(resolve:DATABASE_URL)%'
# IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file)
#server_version: '5.7'
orm:
auto_generate_proxy_classes: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true
mappings:
App:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
thank you very much for reading me.

Obviously I wrong create my entity User.
I make:entity User instead of make:user

Related

Symfony maker bundle doesn't meet the requirements

I'm trying to start a new symfony --version=5.2 project, and before everything else I'm installing the symfony maker bundle, but I get this error which I can't find no solution for it.
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^1.43 for symfony/maker-bundle
./composer.json has been updated
Running composer update symfony/maker-bundle
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires symfony/maker-bundle ^1.43 -> satisfiable by symfony/maker-bundle[v1.43.0].
- symfony/maker-bundle v1.43.0 requires symfony/config ^5.4.7|^6.0 -> found symfony/config[v5.4.7, v5.4.8, v5.4.9, v6.0.0, ..., v6.1.0] but the package is fixed to v5.2.12 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require symfony/maker-bundle:*" to figure out if any version is installable, or "composer require symfony/maker-bundle:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
I tried changing the maker-bundle version myself but still got the same error.
I tried to search for similar problems but no luck finding this error.
{
"type": "project",
"license": "proprietary",
"minimum-stability": "stable",
"prefer-stable": true,
"require": {
"php": ">=7.2.5",
"ext-ctype": "*",
"ext-iconv": "*",
"doctrine/doctrine-bundle": "^2.6",
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/orm": "^2.12",
"symfony/console": "5.2.*",
"symfony/dotenv": "5.2.*",
"symfony/flex": "^1.3.1",
"symfony/framework-bundle": "5.2.*",
"symfony/http-client": "5.2.*",
"symfony/proxy-manager-bridge": "5.2.*",
"symfony/yaml": "5.2.*"
},
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true,
"symfony/flex": true
},
"optimize-autoloader": true,
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php72": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"#auto-scripts"
],
"post-update-cmd": [
"#auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"docker": false,
"require": "5.2.*"
}
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"symfony/browser-kit": "5.2.*",
"symfony/css-selector": "5.2.*",
"symfony/phpunit-bridge": "^6.1"
}
}

Upgrading Symfony 3.4 to 4.x with Flex - Composer Problems

I have a Symfony 3.4 project I'm trying to upgrade to 4.x with Flex but I'm falling at the first hurdle.
With the output of Composer this verbose I assume the answer is staring me straight in the face, but I'm not seeing it. What do I need to do? I've deleted everything in vendor, deleted my composer.lock file, cleared composer cache, etc.
composer.json
{
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"sensio/framework-extra-bundle": "^5.5",
"symfony/console": "4.4.*",
"symfony/dotenv": "4.4.*",
"symfony/flex": "^1.3.1",
"symfony/framework-bundle": "4.4.*",
"symfony/monolog-bundle": "^3.5",
"symfony/orm-pack": "^1.0",
"symfony/profiler-pack": "^1.0",
"symfony/twig-pack": "^1.0",
"symfony/yaml": "4.4.*",
"friendsofsymfony/jsrouting-bundle": "^2.5",
"friendsofsymfony/user-bundle": "~2.0",
"stof/doctrine-extensions-bundle": "^1.3",
"symfony/swiftmailer-bundle": "^2.6.4",
"ext-json": "*"
},
"require-dev": {
"symfony/debug-pack": "^1.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.12.19",
"phpstan/phpstan-doctrine": "^0.12.10",
"phpunit/phpunit": "^7.5",
"symfony/phpunit-bridge": "^3.0"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"#auto-scripts"
],
"post-update-cmd": [
"#auto-scripts"
]
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "4.4.*"
}
}
}
Tried to composer install with:
php -d memory_limit=-1 /usr/local/bin/composer install
And it spews all this out (too big to paste here): https://pastebin.com/KLVRkYdF
Saw something elsewhere about needing to install Flex on its own first, so I tried this:
php -d memory_limit=-1 /usr/local/bin/composer update symfony/flex --no-plugins --no-scripts
But got the following error (too big to paste here): https://pastebin.com/KxG2siZi
The problem is that you haven't updated symfony/swiftmailer-bundle - as given in the composer.json, you tried to install at most v2.6.7 which requires symfony/http-kernelin v2.7 or v3.x. This is not compatible with symfony/framework-bundle in v4.4, as this requires symfony/http-kernel to be of that same v4.4 branch.
Conclusion: also update symfony/swiftmailer-bundle to at least v3.1 which is the first one to be compatible with Symfony v4.
I also had a lot of issues with composer, packageversions and memory limits in the past.
Package vesions:
Set all symfony packages to the version "*" if yout dont require a specific Version at this point. Thisway composer will select the one suitable to your configured symfony version.
Memory limit:
Which IDE are you using? Which PHP Version? 32 or 64 bit? Try running the commany outside of the IDE and see what happens. Alternatively try the symfony command.

Symfony 3 - Sonata Aplication Media Bundle error

I was following the official documentation to install Sonata Media Bundle, I think it worked until the step when I use this command:
php bin/console sonata:easy-extends:generate --dest=src SonataMediaBundle
Then I add new Application\Sonata\MediaBundle\ApplicationSonataMediaBundle(), to AppKernel.php.
After these steps, I try to enter to mi admin (localhost:8000/admin) but throws this error:
Attempted to load class "ApplicationSonataMediaBundle" from namespace "Application\Sonata\MediaBundle".
Did you forget a "use" statement for another namespace?
I try to execute php bin/console doctrine:schema:create (or update) and the error continues:
ubuntu#ubuntu-xenial:/workdir/Testing$ php bin/console doctrine:schema:update --force
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "ApplicationSonataMediaBundle" from namespace "Application\Sonata\MediaBundle".
Did you forget a "use" statement for another namespace? in /workdir/Testing/app/AppKernel.php:32
Stack trace:
#0 /workdir/Testing/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(450): AppKernel->registerBundles()
#1 /workdir/Testing/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(116): Symfony\Component\HttpKernel\Kernel->initializeBundles()
#2 /workdir/Testing/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(137): Symfony\Component\HttpKernel\Kernel->boot()
#3 /workdir/Testing/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(124): Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands()
#4 /workdir/Testing/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(90): Symfony\Bundle\FrameworkBundle\Console\Applica in /workdir/Testing/app/AppKernel.php on line 32
I verified that the routes were correct and followed steps just like the documentation, I've been looking for answers over the internet and found anything. Please help!
I tried to execute php bin/console sonata:easy-extends:generate --dest=src SonataMediaBundle without --dest=src to place folder in app/ but the error continues...
My config.yml according to the doc:
doctrine:
dbal:
driver: pdo_mysql
host: '%database_host%'
port: '%database_port%'
dbname: '%database_name%'
user: '%database_user%'
password: '%database_password%'
charset: UTF8
types:
json: Sonata\Doctrine\Types\JsonType
# if using pdo_sqlite as your database driver:
# 1. add the path in parameters.yml
# e.g. database_path: "%kernel.project_dir%/var/data/data.sqlite"
# 2. Uncomment database_path in parameters.yml.dist
# 3. Uncomment next line:
#path: '%database_path%'
orm:
auto_generate_proxy_classes: '%kernel.debug%'
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
mappings:
ApplicationSonataMediaBundle: ~
SonataMediaBundle: ~
sonata_media:
# if you don't use default namespace configuration
#class:
# media: MyVendor\MediaBundle\Entity\Media
# gallery: MyVendor\MediaBundle\Entity\Gallery
# gallery_has_media: MyVendor\MediaBundle\Entity\GalleryHasMedia
db_driver: doctrine_orm # or doctrine_mongodb, doctrine_phpcr it is mandatory to choose one here
default_context: default # you need to set a context
contexts:
default: # the default context is mandatory
providers:
- sonata.media.provider.dailymotion
- sonata.media.provider.youtube
- sonata.media.provider.image
- sonata.media.provider.file
- sonata.media.provider.vimeo
formats:
small: { width: 100 , quality: 70}
big: { width: 500 , quality: 70}
cdn:
server:
path: /uploads/media # http://media.sonata-project.org/
filesystem:
local:
directory: "%kernel.root_dir%/../web/uploads/media"
create: false
And my routing.yml:
gallery:
resource: '#SonataMediaBundle/Resources/config/routing/gallery.xml'
prefix: /media/gallery
media:
resource: '#SonataMediaBundle/Resources/config/routing/media.xml'
prefix: /media
EDIT:
I think the problem is with Easy-Extends because I tried to install Classification Bundle and the same happens, does current Symfony version support Easy-Extends? Maybe because Sonata User Bundle is not compatible with current version (I tried this too)...
EDIT 2:
My composer.json file:
{
"name": "vagrant/testing",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-4": {
"AppBundle\\": "src/AppBundle"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
},
"files": [
"vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php"
]
},
"require": {
"php": ">=5.5.9",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/orm": "^2.5",
"friendsofsymfony/user-bundle": "^2.0",
"gedmo/doctrine-extensions": "^2.4",
"incenteev/composer-parameter-handler": "^2.0",
"pixassociates/sortable-behavior-bundle": "^1.3",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^3.0.2",
"sonata-project/admin-bundle": "^3.20",
"sonata-project/doctrine-orm-admin-bundle": "^3.1",
"sonata-project/easy-extends-bundle": "^2.2",
"sonata-project/media-bundle": "^3.6",
"stof/doctrine-extensions-bundle": "^1.2",
"symfony/monolog-bundle": "^3.1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.3.10",
"symfony/symfony": "3.3.*",
"twig/twig": "^1.0||^2.0",
"vich/uploader-bundle": "^1.6"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
},
"scripts": {
"symfony-scripts": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-install-cmd": [
"#symfony-scripts"
],
"post-update-cmd": [
"#symfony-scripts"
]
},
"config": {
"sort-packages": true
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": null
}
}
You need to add autoloader definition in your composer.json in a similar way that there is already for AppBundle.
As I understand, the new bundle is generated under path src/Application/Sonata/MediaBundle so it would be:
"autoload": {
"psr-4": {
"AppBundle\\": "src/AppBundle"
"Application\Sonata\MediaBundle\\": "src/Application/Sonata/MediaBundle"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},

Composer.phar install doesn't complete when deploying to Azure

I'm trying to deploy my Symfony app to Microsoft Azure.
I have created a service plan, App, made sure PHP is v5.6 (on which I developed the app locally), added the php_intl.dll extension, pushed files from Git and when running __ php -d extension=php_intl.dll composer.phar install __ after vendor are installed I get the below errors. I run this command in the cloud Kudu command console.
What am I doing wrong? How do I deploy? The guide on Symfony.com is a bit outdated but got me up until this step.
Generating autoload files
Deprecation Notice: The callback Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap declared at D:\home\site\wwwroot\vendor\sensio\distribution-bundle\Composer\ScriptHandler.php accepts a Composer\Script\CommandEvent but post-install-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://D:/home/site/wwwroot/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:290
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
Deprecation Notice: The callback Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache declared at D:\home\site\wwwroot\vendor\sensio\distribution-bundle\Composer\ScriptHandler.php accepts a Composer\Script\CommandEvent but post-install-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://D:/home/site/wwwroot/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:290The symfony-bin-dir (bin) specified in composer.json was not found in D:\home\site\wwwroot, can not clear the cache.
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
Deprecation Notice: The callback Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets declared at D:\home\site\wwwroot\vendor\sensio\distribution-bundle\Composer\ScriptHandler.php accepts a Composer\Script\CommandEvent but post-install-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://D:/home/site/wwwroot/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:290
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets
Deprecation Notice: The callback Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile declared at D:\home\site\wwwroot\vendor\sensio\distribution-bundle\Composer\ScriptHandler.php accepts a Composer\Script\CommandEvent but post-install-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://D:/home/site/wwwroot/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:290
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile
The symfony-bin-dir (bin) specified in composer.json was not found in D:\home\site\wwwroot, can not install assets.
The symfony-bin-dir (bin) specified in composer.json was not found in D:\home\site\wwwroot, can not install the requirements files.
Deprecation Notice: The callback Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget declared at D:\home\site\wwwroot\vendor\sensio\distribution-bundle\Composer\ScriptHandler.php accepts a Composer\Script\CommandEvent but post-install-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://D:/home/site/wwwroot/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:290
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget
Composer.json file:
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-4": { "": "src/" },
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
},
"autoload-dev": {
"psr-4": { "Tests\\": "tests/" }
},
"require": {
"php": ">=5.5.9",
"symfony/symfony": "3.0.*",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^2.8",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"symfony/console": "^3.0",
"symfony/assetic-bundle": "^2.7",
"symfony/security": "^3.0",
"knplabs/knp-menu-bundle": "^2.1",
"twbs/bootstrap": "^3.3",
"gregwar/captcha-bundle": "^2.0",
"friendsofsymfony/rest-bundle": "^1.7",
"jms/serializer-bundle": "^1.1",
"ci/restclientbundle": "^1.0",
"eightpoints/guzzle-bundle": "^4.4",
"jasongrimes/paginator": "^1.0",
"knplabs/knp-paginator-bundle": "^2.5",
"liip/imagine-bundle": "^1.5",
"symfony/dependency-injection": "^3.0",
"sensio/generator-bundle": "^3.0",
"symfony/event-dispatcher": "^3.0",
"friendsofsymfony/jsrouting-bundle": "^1.6",
"league/oauth2-client": "^1.4",
"league/oauth2-facebook": "^1.4"
},
"require-dev": {
"symfony/phpunit-bridge": "^2.7"
},
"scripts": {
"post-install-cmd": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-update-cmd": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
]
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "3.0-dev"
}
}
}
I never deployed on Microsoft Azure but so far it looks like some resources are not where they're expected. Have a look to your composer.json
You need to make sure that your .gitignore file has the following so that composer knows which requirements need to be installed
!bin/console
!bin/symfony_requirements
As documented by gitignore/Symfony.gitignore here

Create a 3rd part bundle and share it between projects

I made a tiny bundle that saves a lot of time when you want to create a restfull api on symfony2 using FosRestBundle and jmsSerializer.
I would like to share this bundle in my projects, but when i add it to its destination, composers returns "Your requirements could not be resolved to an installable set of packages."
I guess i made something wrong but can not find out what
I created a repo on git ( https://github.com/LeniM/apiGenericBundle )
Added the composer.json :
{
"name": "lenim/api-generic-bundle",
"type": "symfony-bundle",
"description": "Rest Api creation helper",
"keywords": ["Api", "RestApi"],
"homepage": "http://friendsofsymfony.github.com",
"license": "MIT",
"minimum-stability" : "dev",
"target-dir": "LeniM/ApiGenericBundle",
"authors": [
{
"name": "Martin Leni",
"role" : "Developer"
}
],
"require": {
"php": ">=5.3.3",
"symfony/framework-bundle": "~2.3|~3.0",
"doctrine/orm": "^2.5",
"friendsofsymfony/rest-bundle": "^1.7",
"jms/serializer-bundle": "^1.1"
},
"require-dev": {
"symfony/console": "~2.3|~3.0",
"symfony/phpunit-bridge": "~2.7|~3.0",
"symfony/validator": "~2.3|~3.0",
"symfony/yaml": "~2.3|~3.0",
"willdurand/propel-typehintable-behavior": "~1.0"
},
"suggest": {
"nelmio/NelmioApiDocBundle": "More than recommanded to keep your api well documentated"
},
"autoload": {
"psr-4": { "LeniM\\ApiGenericBundle\\": "" }
},
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"support": {
"docs": "https://github.com/LeniM/apiGenericBundle/readme.md"
}
}
required it with its name : lenim/api-generic-bundle
Is there something else to do to register your thrid part bundle to composer ?
Thanks :)
You have to either publish this package on packagist.org or specify target repository path in particular project's composer.json file: https://getcomposer.org/doc/05-repositories.md#vcs

Resources