When I use: php bin/console make:entity, I get the following error:
"Doctrine\Persistence\Mapping\Driver\AnnotationDriver" does not exist.
Symfony 4.4 support has been dropped for the maker bundle.
You need to upgrade your symfony version (it's not that hard from 4.4 to 5.4).
However, there is a temporary fix if you want by modifying your composer.json and downgrade your doctrine/orm to 2.11 until you migrate to symfony 5.4.
Change your composer.json with:
"doctrine/orm": "2.11.*",
And also:
"conflict": {
"symfony/symfony": "*",
"doctrine/orm": "2.12.0"
},
Don't forget to run composer update
Related
Symfony 4.2 documentation :
"
For example, to override the translations defined in the Resources/translations/FOSUserBundle.es.yml file of the FOSUserBundle, create a<your-project>/translations/FOSUserBundle.es.yml file.
"
That's doesn't work for me and i clean my cache ! Any one have some idea ?
Symfony take always the FOSUserBundle.es.yml of vendor.
Create a folder in /translations/FOSUserBundle/, move the translations you need and redo it.
"friendsofsymfony/user-bundle": "^2.1"
"symfony": "require": "4.2.*"
I am looking how to upgrade the framework Symfony 2.8 to 3.4 without internet.
Can I configure the composer.json to upgrade Symfony from a local repository?
My development environment doesn't have access to internet.
If you have symfony code locally - as well as any other vendor code - you can configure composer in order to update from local source
"repositories": [
{
"type": "vcs",
"url" : "/path/to/local/sf/code"
}
],
Please remember to get rid of this as soon as you're ready to retrieve the vendor from the internet.
I am looking how to upgrade the framework Symfony 2.8 to 3.4 using local directory.
My development environment doesn't have access to internet.
I've followed https://getcomposer.org/doc/05-repositories.md#path
I download Symfony 3.4 and deposit it in the same directory as Synfony 2.8
Frameworks
Symfony-2.8
Symfony-3.4
Then I configured the composer.json file (symfony 2.8) like this :
"repositories": [
{
"type": "path",
"url" : "/frameworks/symfony3-4"
}
],
"require": {
"/frameworks/symfony3-4": "*"
},
When I try the update :
Composer update
I have this error :
Problem 1
- The requested package ../symfony3-4 could not be found in any version, there
may be a typo in the package name.
Potential causes:
A typo in the package name
The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Do you have any suggestion to do it ?
use "symfony/symfony": "^3.0" in your require statement
I'm trying to upgrade from Symfony 2.8 to Symfony 3, but I cannot update it from Composer.
I get this error :
hellogerard/jobby dev-master requires symfony/process ^2.7 -> satisfiable by symfony/process[v2.7.0 ... blabla bla v2.8.2]
When I look the composer.json file of this library I need, I see this :
"require": {
(...)
"symfony/process": "^2.7"
},
You can find the composer file of Jobby here : https://github.com/jobbyphp/jobby/blob/master/composer.json
The problem is that in Symfony 3, the symfony/process version is 3.0, and because of the "^2.7" on Jobby's composer.json, I cannot get it. I know that there is no backwards compatibilities problems with symfony/process, so how can I do to fix / ignore that problem ?
Regards
Create your own fork and make a pull request on the base repository.
If there is no BC-break using the requested package with symfony/process:3.0,
just change the package version from ^2.7 to ^3.0 or >=2.7 in your fork's composer.json.
EDIT
Then, tell composer to use your fork for installations, like this :
"repositories": [
{
"type": "vcs",
"url": "https://github.com/yourusername/jobby"
}
],
"require": {
"hellogerard/jobby": "dev-master"
}
See VCS Repositories documentation
When I run doctrine schema update, I am getting this weird queries that need to be executed but they are basically just redoing already done or not?
php app/console doctrine:schema:update --dump-sql
DROP INDEX idx_26d7e8feab772a3c ON notify;
CREATE INDEX IDX_217BEDC8AB772A3C ON notify (notifyUser_id);
DROP INDEX idx_26d7e8fea76ed395 ON notify;
CREATE INDEX IDX_217BEDC8A76ED395 ON notify (user_id);
DROP INDEX idx_26d7e8fe6bf700bd ON notify;
CREATE INDEX IDX_217BEDC86BF700BD ON notify (status_id);
"require": {
"php": ">=5.3.3",
"symfony/symfony": "~2.5.3",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "~1.2",
"gedmo/doctrine-extensions": "2.3.*#dev",
"stof/doctrine-extensions-bundle": "~1.1#dev",
},
This behaviour stops me from updating doctrine schema with --force because there are foreign keys and I get this error:
[PDOException]
SQLSTATE[HY000]: General error: 1553 Cannot drop index 'IDX_A37CA197A76ED395': neede
d in a foreign key constraint
This started to happening probably after updating DB related vendors in past but I haven't notice it until now.
#theapprenticecoder #Trki this problem can be solve by the command
$ app/console doctrine:schema:update --force --complete
which is the best solution.
I can confirm you that this probably happened when you upgraded Doctrine Vendors.
This issue was fixed with the doctrine/dbal 2.5.1 version.
All you need to do is install the v2.5.1 doctrine/dbal dependency.
Then just do a "php app/console doctrine:schema:update --force" and your problem will be solved...