Comments (17)
Could you be more specific please?
from knpradbundle.
sorry .. was in a rush back then.
i fixed the issue by config:
knp_rad:
listener:
orm_user: false
in the RAD spirit it might however make sense to automatically discover that the relevant services are missing in a compiler pass and automatically disable the relevant services
from knpradbundle.
Oh yes, indeed. We could disable all services that depends on other symfony services that are not available.
from knpradbundle.
Here are the rules I've found so far that could be implemented inside a compiler pass:
- Remove
knp_rad.flash.message_renderer
if servicetranslator
is not registered - Remove
knp_rad.twig.flash_extension
if servicesession
is not registered (is that possible?) - Remove
knp_rad.form.manager
if servicerequest
is not registered - Remove
knp_rad.form.type_creator
if serviceform.factory
orform.registry
is not registered - Remove
knp_rad.form.default_creator
if serviceform.factory
is not registered - Remove
knp_rad.twig.link_attributes_extension
if serviceform.csrf_provider
is not registered - Remove
knp_rad.csrf.listener
if serviceform.csrf_provider
is not registered - Remove
knp_rad.mailer.message_factory
if servicemailer
ortwig
is not registered - Remove
knp_rad.orm.user_listener
if servicesecurity.encoder_factory
is not registered - Remove
knp_rad.routing.loader
if servicefile_locator
is not registered - Remove
knp_rad.view.listener
if servicetemplating
ortwig
orcontroller_name_converter
is not registered - Remove
knp_rad.view.path_deducer
if servicetemplating.name_parser
is not registered
Furthermore, it needs some more investigation to check if thoses services are somehow dependances of other services (that should then be also removed, etc.)!
Finally, I was thinking maybe it could be a nice idea to log warning about the fact that the service has been deactivated automatically and should be configured to be deactivated (or that user would need to install some 3rd party lib to enable this service).
What do you think @docteurklein @Herzult @everzet @lsmith77 ?
from knpradbundle.
maybe there could be a command for this?
from knpradbundle.
potentially also a profiler tab with status information about disabled features
from knpradbundle.
yes, we should remove the whole service stack that depends on unexistant service. Removing knp_rad.view.path_deducer
will make fail the AssistantController for example.
from knpradbundle.
@lsmith77 @gquemener could we take advantage of http://symfony.com/doc/current/cookbook/bundles/prepend_extension.html to detect FrameworkBundle config form: enabled
for example ?
from knpradbundle.
/me is currently giving a try to prepend configurations.
from knpradbundle.
Woo, never heard about this feature before! Sounds like what we are trying to achieve here!
from knpradbundle.
As it is prepended configuration, I believe that if user explicitly defines listener.orm_user: true
and the security services aren't available, then it would not be overwritten, right?
from knpradbundle.
i'm checking. EDIT: works as expected: if you force the value to true in config, autodetection will be overwritten.
from knpradbundle.
commiting right now for you to see: @lsmith77 @gquemener .
PS: specs didn't detect any change Oo. I'll have to write specs for that.
from knpradbundle.
from knpradbundle.
@docteurklein i wouldnt use prepend extension for this. you dont really care about specific 3rd party bundles but the availability of certain services.
from knpradbundle.
I'm just encountering problems, with order of removal, since some compiler passses seems to already have a reference on some (later removed) services. Trying to use TPYE_BEFORE_(REMOVING|OPTIMIZE) without success.
from knpradbundle.
nevermind.
from knpradbundle.
Related Issues (20)
- ServiceCircularReferenceException HOT 8
- Docs fix: addParameter should be setParameter HOT 1
- Auto registration Twig extensions with arguments HOT 2
- Two Symfony version dependency
- Rewriting Behat tests HOT 16
- We need a new stable release HOT 8
- Impossible to use as "dev-master" dependency HOT 3
- Support for Auto-Registering Event Subscribers HOT 3
- array syntax used on rad.knplabs.com cannot be used with minimum rad-edition requirements HOT 1
- [RFC] it could load every yml file present in config/services folder HOT 6
- rename jquery-ujs. HOT 6
- add copyright headers on all files HOT 4
- twitter bootstrap 3? HOT 3
- createAccessDeniedException() must be public HOT 6
- The "flashes" twig tag should have access to parent scope variables HOT 2
- split KnpRadBundle into smaller components HOT 11
- port Metawidget to Symfony
- Symfony 2.7 support HOT 8
- Caching option for better performance
- Bundle is outdated
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 knpradbundle.