Unrecognized option "firewall_name" under "hwi_oauth" - symfony

After upgrade of my project to symfony 2.8 I get the following error when I push the code to staging server.
[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
Unrecognized option "firewall_name" under "hwi_oauth"
When i remove firewall_name option then I get an error that the option is required.
If someone provide some insight will be much appreciated.

You get this error now because when You was updating Symfony rest of dependencies was updated also.
This option was renamed to firewall_names to support multiple firewalls in this commit: https://github.com/hwi/HWIOAuthBundle/commit/9bdbc089ddffede12a5b575a441c4e0fa2ee9dd7 and released as part of 0.4.0 version.
Now it's value must be array. Example:
hwi_oauth:
firewall_names: [secured_area]

Related

Symfony 5 doctrine_migrations error on script boot

As far as i can tell, i can't see any other questions that ask this, so here goes:
I've been running the latest Symfony, for a side project, and encountered this error as i was writing the app. Nothing i do now fixes it, not even re-installing symfony, and i have no idea what the problem even is. I am getting the error:
The parameter "doctrine_migrations.dir_name" has a dependency on a
non-existent parameter "kernel.root_dir". Did you mean one of these:
"kernel.project_dir", "kernel.cache_dir", "kernel.logs_dir"?
It seems that you are using the undefined kernel.root_dir variable in your config/packages/doctrine_migrations.yaml config file.
You should replace it by kernel.project_dir:
# config/packages/doctrine_migrations.yaml
doctrine_migrations:
dir_name: '%kernel.project_dir%/src/Migrations'
See: https://symfony.com/doc/master/bundles/DoctrineMigrationsBundle/index.html#configuration
Just to document the root cause.
Symfony 5 removed kernel.root_dir parameters. Doctrine Migrations Bundle uses it as default value for dir_name.
It's been discussed. See https://github.com/doctrine/DoctrineMigrationsBundle/issues/305 and https://github.com/doctrine/DoctrineMigrationsBundle/pull/295.
SOLUTION: right now (Symfony 5 and Migrations bundle 2.1.x), you should not delete doctrine_migrations.yaml. Leave it there with a dir_name that does not raise en error.
at this point i am assuming it is a symfony bug, so i will close this question. Thanks for everyone's help!
try
composer remove orm
composer require symfony/orm-pack

Why does Flyway ignoreMissingMigrations is not taken into account?

I have a setup in which migrations from previous scripts were removed.
The flyway configuration specifies that ignoreMissingMigrations is true.
However, Flyway fails with the following error
Validate failed: Detected applied migration not resolved locally: version_x
where version_x is the first version that was removed after baseline.
Why do I get this error although ignoreMissingMigrations is true ?
Note: Flyway version: 4.2.0
The problem comes from a special setup that Flyway is unable to handle correctly.
We have no newer applied migration, thus Flyway see this migration as a future migration instead of a missing migration. Thus the solution is to set ignoreFutureMigrations to true in addition to ignoreMissingMigrations.

How to remove this error?

There has been an error processing your request
Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Magento_CustomWidget schema: current version - none, required version - 2.0.0
Magento_CustomWidget data: current version - none, required version - 2.0.0
Error log record number: 1078485663282
my code is module.xml
<?xml version="1.0"?>
`<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"` xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Magento_CustomWidget" setup_version="2.0.0"/>
</config>
I had the similar issue and it's likely to be caused by renaming your module(ie: when you try to make a backup copy and leave it in the same directory, ideally we should first disable the module then make a copy), and you must have run bin/magento setup:upgrade - not knowing that you're registering two identical module into database.
How I did to fix the issue was to go to database table: setup_module and find the entry in your case is: Magento_CustomWidget, then update the schema and data both to 2.0.0. It's an easy fix if you have phpmyadmin, see if it helps.

Symfony ICU Issue, routes using locale different than EN will fail

After installing Yosemite and a new version of MAMP
and when I'm trying to execute
domain/app_dev.php/es/venues/3/show
This route is rendering a form containing a language type field, so it's requiring ICU.
being 'es' the locale i get errors. If I changed it to 'en' there's no problem.
The errors are:
[1/2] ResourceBundleNotFoundException: The resource bundle
"/Users/a77/Documents/DEV/UVox
Com/vendor/symfony/icu/Symfony/Component/Icu/Resources/data/lang/root.php"
does not exist.
[2/2] Couldn't read the indices [Languages] from
"/Users/a77/Documents/DEV/UVox
Com/vendor/symfony/icu/Symfony/Component/Icu/Resources/data/lang/es.res".
The indices also couldn't be found in the fallback locale(s)
"root.res".
My symfony version is 2.5, I'm running the MAMP PHP 5.5.10.
I updated dependencies via composer, including "symfony/intl": "*",
I have followed several webs in order to install icu and intl via pecl. But still get the error. I don't know how to check if the installations or the configs are ok. Maybe you can let me know how to test both via terminal and let you know what is the result...
This is because you are trying to get resources only for language es. But now (from the moment of importing to Symfony icu data) you need to get language resources via language and country codes es_ES.
You may not be able to just simply activate intl.so after the Yosemite update. I solved the issue installing intl.so following an excellent article by Danilo Braband http://dab.io/posts/getting-started-with-symfony-on-yosemite.html
Solved updgrading to Symfony 2.5.6

Configuration files are ignored after migrating to Servicemix 5

We use a .cfg file in ./etc directory to configure our bundle in ServiceMix. Everything worked fine in SMX 4.5.3, but when migrating to the 5th version the file is not picked up. When the bundle encounters a property the following exception is thrown:
java.lang.IllegalArgumentException: Property with key [xslt.dir] not found in properties from text: {{xslt.dir}}, StackTrace: org.apache.camel.RuntimeCamelException: java.lang.IllegalArgumentException: Property with key [xslt.dir] not found in properties from text: {{xslt.dir}}
However, if I put the properties in default-properties section in my blueprint configuration, it works.
Also, the console command config:list actually shows the properties for the bundle in spite of the exception:
Pid: misrouter
BundleLocation: mvn:ru.mig/mis-router/1.0-SNAPSHOT
Properties:
service.pid = misrouter
felix.fileinstall.filename = file:/home/petr/programs/5.0.0-apache-servicemix/etc/misrouter.cfg
xslt.dir = /home/petr/programs/5.0.0-apache-servicemix/xslt
So was something changed in SMX 5 configuration mechanism or is there a bug in it?
What version of the JDK/JRE are you using? When I was trying this out a few minutes ago to answer your question, I also had some problems using the 1.7.0_15 version I had installed and upgrading to the latest 1.7.0_51 fixed those for me.
Actually it's related to Camel vm component, a bug was created for SMX

Resources