Comments (4)
There is a good reason to inject the container because we need them to replace placeholders [ref] like on the Symfony\Bundle\FrameworkBundle\Routing\Router
[ref].
from fmbbcodebundle.
Another approach is to inject parameters directly, so we can process them inside hook. Yaml file can be read by Yaml\Parser. What is your opinion, @alquerci ?
from fmbbcodebundle.
inject parameters directly
Indeed here we just need of all container parameters but it is not possible to inject all of them.
Yaml file can be read by Yaml\Parser.
I do not understand you idea with this sentence. A parser can only parse and do not anything else.
This is the exception to the rule of not injecting the container.
The behind feature is a way to use all container parameters to avoid duplicate configuration like shown on the README:
# path/to/emoticons.yml
imports:
- { resource: path/to/another/emoticons.yml }
emoticons:
my_emoticon:
url: # Default: %fm_bbcode.emoticon.path%/my_emoticon.png
html: # Default: <img src="%fm_bbcode.emoticon.path%/my_emoticon.png" alt="" >
xHtml: # Default: <img src="%fm_bbcode.emoticon.path%/my_emoticon.png" alt="" />
smilies:
- ":my_emoticon:"
In order to keep back compatibility we cannot remove this feature.
But it's possible that is only useful to resolve the fm_bbcode.emoticon
parameter namespace. In that case we can inject only all needed parameters to resolve them for the next major version (it is a regression).
from fmbbcodebundle.
I do not understand you idea with this sentence. A parser can only parse and do not anything else.
My idea was to address emoticon file via fm_bbcode.emoticon parameter, and then process it, so we were able to avoid inject whole container.
This is the exception to the rule of not injecting the container.
Ok i got it.
from fmbbcodebundle.
Related Issues (20)
- How to use the template option ? HOT 3
- How to use bbcode_clean directly in controller ? HOT 16
- Add configuration option for setMaxNewlines
- Make bundle compatible with SF3.0 HOT 11
- List of availableBBCodes HOT 3
- Disable Decoda's default emoticons HOT 2
- [code] Crash HOT 2
- Disable filters/hooks via config.yml? HOT 1
- [code] encode base64 problem
- Special spaces and emoticons
- Errors while clearing the symfony cache HOT 1
- Problem with ulr tag which contain "_" HOT 1
- Is compatible with Symfony 4? HOT 1
- problem with [img] and emoticon HOT 1
- Dependabot can't resolve your PHP dependency files
- Dependabot can't resolve your PHP dependency files
- Dependabot can't resolve your PHP dependency files
- Dependabot can't resolve your PHP dependency files
- Compatible with Symfony 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fmbbcodebundle.