TbbcMoneyBundle | Money library from mathiasverraes | Web Framework library
kandi X-RAY | TbbcMoneyBundle Summary
kandi X-RAY | TbbcMoneyBundle Summary
This bundle is used to integrate the Money library from mathiasverraes (https://github.com/mathiasverraes/money) into a symfony2 project. This library is based on Fowler's Money pattern (http://blog.verraes.net/2011/04/fowler-money-pattern-in-php/)
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Adds the currency section .
- Load ratio list
- Get ratio history .
- Register Pair History .
- Handles the configuration injection .
- Fetches the ratio of a currency .
- Saves the ratio .
- Get current exchange rate .
- Configure the options .
- Get the ratio from the response .
TbbcMoneyBundle Key Features
TbbcMoneyBundle Examples and Code Snippets
Community Discussions
Trending Discussions on TbbcMoneyBundle
QUESTION
I'm starting to migrate my application to symfony4 but I have the following deprecation notice in one of my third-party bundle ( tbbcmoneybundle . And I would like to know what to change in order to propose a PR
Currently the build is failing because of these errors (complete report here )
...ANSWER
Answered 2018-Jan-05 at 17:58The problem looks like it comes from the loss of container awareness (if that's a valid phrase) in Symfony 4, which started in Symfony 3.4. This blog talks about restricting container injection in 3.4 and how it will go away in 4.0.
It looks as though someone has opened a PR to upgrade to Symfony 4, but that is failing. (Looks like you're trying to help that along as well.)
According to this Travis integration test that is failing, the commands which extend "ContainerAwareCommand" are the source of the fail.
Which makes sense. The ContainerAwareCommand attempts to inject the Container, which is set to private
in Symfony 4 (and deprecated since 3.4) as outlined in the blog post above. A fix, and I think you want to fix this in a PR to TBBC if I read your question correctly, seems to be to remove the extension of ContainerAwareCommand from those command classes and just inject the services necessary. See the new Symfony 4 doc on commands (and note that ContainerAware is no longer an option as it was in 2.8-ish.)
In short, get rid of the extension to ContainerAwareCommand and inject the services used by those commands. (Might need to do some extra configuration to ensure that the services are public.)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install TbbcMoneyBundle
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page