-
-
Notifications
You must be signed in to change notification settings - Fork 1
Upgrading
github-actions[bot] edited this page Jun 25, 2026
·
1 revision
Руководство по переходу между версиями cloudcastle/di.
Добавлены без breaking changes:
-
Autowiring:
enableAutowiring(),disableAutowiring(),autowire(), расширенныйget()/has() -
Attributes:
CloudCastle\DI\Attribute\Inject,Autowire -
Intersection-типы и autowiring по имени:
enableParameterNameAutowiring()(по умолчанию выключен) -
Autowiring свойств и методов:
enablePropertyAutowiring(),enableMethodAutowiring(); attributes на property/method — всегда -
Сканирование:
scan($directory, $namespace?) -
Tagged services и декораторы:
tag(),getTagged(),decorate() -
Глобальный реестр:
ContainerRegistry::set()/get()/has()/reset() - Классы:
Autowirer,MemberResolver,PropertyInjector,MethodInjector,ClassScanner,ParameterTypeResolver,ClassDependencyResolver,IntersectionTypeResolver,AttributeServiceIdReader
Существующий код с только set() / get() работает без изменений.
- Обновите пакет:
composer update cloudcastle/di-
При желании включите autowiring в bootstrap вместо ручного
set()для каждого класса. -
Если используете
ContainerRegistry, вызывайтеContainerRegistry::reset()в PHPUnittearDown. -
Прочитайте Autowiring и Анти-паттерны перед
scan()всегоsrc/.
Изменений в публичном API нет. Wiki, CI и dev-зависимости.
Изменений в публичном API нет. Keywords/description на Packagist.
Major-версия будет описана здесь и в CHANGELOG.
- Прочитайте CHANGELOG для выбранной версии.
- Запустите тесты проекта после
composer update. - Issues · Discussions Q&A