Removed php-di
authorAlexander Ebert <ebert@woltlab.com>
Wed, 25 Nov 2015 14:27:48 +0000 (15:27 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 25 Nov 2015 14:27:48 +0000 (15:27 +0100)
commitf341086bcee3b9d5d847d17e16bcf3c887e8bcf4
tree0aa8040a52f6228f4c608313a932b220bbbbc6c8
parent1c45690475f030de8bb54fb27bd581d5895d2a2e
Removed php-di

​Originally intended to phase out SingletonFactory and get rid of its
downsides, there are a few issues that effectively prevent us from using
DI right now:

* There are a rather large amount of current singletons that impose a
circular dependency on runtime, resolving these would require more
changes to the API and the behavior than we're comfortable with
* Being able to replace classes with a derived one is a great feature,
but unfortunately the event system isn't exactly aware of this and
unless one explicitly opts-in for inheritance, event listeners would not
be executed. This could lead to rather unpredictable behaviors and
debugging issues could be rather challenging
* Only some classes qualify for DI, for instance SingletonFactory has a
locked constructor that can be overriden without breaking BC. This leads
to a mixture of "real" DI classes (using constructor injection) and
others that explicitly invoke the DI container to fetch dependencies on
runtime, negating one key aspect of DI (knowledge about dependencies w/o
examining the class source)

These are the major issues with the current implementation and we rather
chose to ditch DI for now until we have proper solutions for all issues.
Most likely this will mean that we won't see DI in the 2.x tree of WCF
at all.
151 files changed:
wcfsetup/install/files/lib/form/MessageForm.class.php
wcfsetup/install/files/lib/system/SingletonFactory.class.php
wcfsetup/install/files/lib/system/WCF.class.php
wcfsetup/install/files/lib/system/WCFACP.class.php
wcfsetup/install/files/lib/system/WCFSetup.class.php
wcfsetup/install/files/lib/system/api/composer.json
wcfsetup/install/files/lib/system/api/composer.lock
wcfsetup/install/files/lib/system/api/composer/autoload_files.php
wcfsetup/install/files/lib/system/api/composer/autoload_psr4.php
wcfsetup/install/files/lib/system/api/composer/installed.json
wcfsetup/install/files/lib/system/api/container-interop/container-interop/.gitignore [deleted file]
wcfsetup/install/files/lib/system/api/container-interop/container-interop/LICENSE [deleted file]
wcfsetup/install/files/lib/system/api/container-interop/container-interop/README.md [deleted file]
wcfsetup/install/files/lib/system/api/container-interop/container-interop/composer.json [deleted file]
wcfsetup/install/files/lib/system/api/container-interop/container-interop/docs/ContainerInterface-meta.md [deleted file]
wcfsetup/install/files/lib/system/api/container-interop/container-interop/docs/ContainerInterface.md [deleted file]
wcfsetup/install/files/lib/system/api/container-interop/container-interop/docs/Delegate-lookup-meta.md [deleted file]
wcfsetup/install/files/lib/system/api/container-interop/container-interop/docs/Delegate-lookup.md [deleted file]
wcfsetup/install/files/lib/system/api/container-interop/container-interop/docs/images/interoperating_containers.png [deleted file]
wcfsetup/install/files/lib/system/api/container-interop/container-interop/docs/images/priority.png [deleted file]
wcfsetup/install/files/lib/system/api/container-interop/container-interop/docs/images/side_by_side_containers.png [deleted file]
wcfsetup/install/files/lib/system/api/container-interop/container-interop/src/Interop/Container/ContainerInterface.php [deleted file]
wcfsetup/install/files/lib/system/api/container-interop/container-interop/src/Interop/Container/Exception/ContainerException.php [deleted file]
wcfsetup/install/files/lib/system/api/container-interop/container-interop/src/Interop/Container/Exception/NotFoundException.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/invoker/CONTRIBUTING.md [deleted file]
wcfsetup/install/files/lib/system/api/php-di/invoker/LICENSE [deleted file]
wcfsetup/install/files/lib/system/api/php-di/invoker/README.md [deleted file]
wcfsetup/install/files/lib/system/api/php-di/invoker/composer.json [deleted file]
wcfsetup/install/files/lib/system/api/php-di/invoker/doc/parameter-resolvers.md [deleted file]
wcfsetup/install/files/lib/system/api/php-di/invoker/src/CallableResolver.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/invoker/src/Exception/InvocationException.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/invoker/src/Exception/NotCallableException.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/invoker/src/Exception/NotEnoughParametersException.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/invoker/src/Invoker.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/invoker/src/InvokerInterface.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/invoker/src/ParameterResolver/AssociativeArrayResolver.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/invoker/src/ParameterResolver/Container/ParameterNameContainerResolver.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/invoker/src/ParameterResolver/Container/TypeHintContainerResolver.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/invoker/src/ParameterResolver/DefaultValueResolver.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/invoker/src/ParameterResolver/NumericArrayResolver.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/invoker/src/ParameterResolver/ParameterResolver.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/invoker/src/ParameterResolver/ResolverChain.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/invoker/src/Reflection/CallableReflection.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/.coveralls.yml [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/.gitattributes [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/.gitignore [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/.travis.yml [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/404.md [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/CONTRIBUTING.md [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/LICENSE [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/README.md [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/change-log.md [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/composer.json [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/couscous.yml [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/phpunit.xml.dist [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Annotation/Inject.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Annotation/Injectable.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Cache/ArrayCache.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Container.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/ContainerBuilder.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Debug.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/AliasDefinition.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/ArrayDefinition.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/ArrayDefinitionExtension.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/CacheableDefinition.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/DecoratorDefinition.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Definition.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Dumper/AliasDefinitionDumper.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Dumper/ArrayDefinitionDumper.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Dumper/DecoratorDefinitionDumper.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Dumper/DefinitionDumper.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Dumper/DefinitionDumperDispatcher.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Dumper/EnvironmentVariableDefinitionDumper.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Dumper/FactoryDefinitionDumper.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Dumper/ObjectDefinitionDumper.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Dumper/StringDefinitionDumper.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Dumper/ValueDefinitionDumper.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/EntryReference.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/EnvironmentVariableDefinition.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Exception/AnnotationException.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Exception/DefinitionException.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/FactoryDefinition.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/HasSubDefinition.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Helper/ArrayDefinitionExtensionHelper.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Helper/DefinitionHelper.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Helper/EnvironmentVariableDefinitionHelper.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Helper/FactoryDefinitionHelper.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Helper/ObjectDefinitionHelper.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Helper/StringDefinitionHelper.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Helper/ValueDefinitionHelper.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/InstanceDefinition.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/ObjectDefinition.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/ObjectDefinition/MethodInjection.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/ObjectDefinition/PropertyInjection.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Resolver/AliasResolver.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Resolver/ArrayResolver.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Resolver/DecoratorResolver.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Resolver/DefinitionResolver.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Resolver/EnvironmentVariableResolver.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Resolver/FactoryResolver.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Resolver/InstanceInjector.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Resolver/ParameterResolver.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Resolver/ResolverDispatcher.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Resolver/StringResolver.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Resolver/ValueResolver.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Source/AnnotationReader.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Source/Autowiring.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Source/CachedDefinitionSource.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Source/DefinitionArray.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Source/DefinitionFile.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Source/DefinitionSource.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Source/MutableDefinitionSource.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/Source/SourceChain.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/StringDefinition.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Definition/ValueDefinition.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/DependencyException.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/FactoryInterface.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Invoker/DefinitionParameterResolver.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/InvokerInterface.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/NotFoundException.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Proxy/ProxyFactory.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Reflection/CallableReflectionFactory.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/Scope.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/php-di/src/DI/functions.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/phpdoc-reader/.gitattributes [deleted file]
wcfsetup/install/files/lib/system/api/php-di/phpdoc-reader/.gitignore [deleted file]
wcfsetup/install/files/lib/system/api/php-di/phpdoc-reader/LICENSE [deleted file]
wcfsetup/install/files/lib/system/api/php-di/phpdoc-reader/README.md [deleted file]
wcfsetup/install/files/lib/system/api/php-di/phpdoc-reader/composer.json [deleted file]
wcfsetup/install/files/lib/system/api/php-di/phpdoc-reader/src/PhpDocReader/AnnotationException.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/phpdoc-reader/src/PhpDocReader/PhpDocReader.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/phpdoc-reader/src/PhpDocReader/PhpParser/TokenParser.php [deleted file]
wcfsetup/install/files/lib/system/api/php-di/phpdoc-reader/src/PhpDocReader/PhpParser/UseStatementParser.php [deleted file]
wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php
wcfsetup/install/files/lib/system/event/EventHandler.class.php
wcfsetup/install/files/lib/system/html/input/HtmlInputProcessor.class.php
wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php
wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeWoltlabMention.class.php
wcfsetup/install/files/lib/system/html/output/HtmlOutputNodeProcessor.class.php
wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeBlockquote.class.php
wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeWoltlabMention.class.php
wcfsetup/install/files/lib/system/request/ControllerMap.class.php
wcfsetup/install/files/lib/system/request/LinkHandler.class.php
wcfsetup/install/files/lib/system/request/RequestHandler.class.php
wcfsetup/install/files/lib/system/request/RouteHandler.class.php
wcfsetup/install/files/lib/system/request/route/DynamicRequestRoute.class.php
wcfsetup/install/files/lib/system/request/route/LookupRequestRoute.class.php
wcfsetup/install/files/lib/system/request/route/StaticRequestRoute.class.php
wcfsetup/install/files/lib/system/session/ACPSessionFactory.class.php
wcfsetup/install/files/lib/system/session/SessionHandler.class.php