Skip to content

Commit 4acaa9a

Browse files
committed
Set deprecations leading to 3.0
1 parent ca3f919 commit 4acaa9a

24 files changed

+110
-1851
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
..
33
.phpunit.cache
44
architectural-decisions.xml.bak
5+
composer.lock
56
build/
67
vendor/

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [v2.4.0](https://github.com/cspray/annotated-container/tree/v2.4.0) - 2024-06-08
8+
## [2.4.0](https://github.com/cspray/annotated-container/tree/v2.4.0) - 2025-06-18
99

1010
### Added
1111

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2023 Charles Sprayberry
3+
Copyright (c) 2025 Charles Sprayberry
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

architectural-decisions.xml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,4 +278,54 @@ functionality, you should implement your own custom ServiceAttribute.]]></conten
278278
</deprecation>
279279
</meta>
280280
</architecturalDecision>
281+
<architecturalDecision id="DeprecateDefinitionBuilderImplementations" attribute="Cspray\AnnotatedContainer\ArchitecturalDecisionRecords\DeprecateDefinitionBuilderImplementations">
282+
<date>2025-05-15</date>
283+
<status>Accepted</status>
284+
<contents><![CDATA[# Deprecate Definition Builder implementations
285+
286+
## Context
287+
288+
Starting with the initial versions of Annotated Container most Definitions that make up a ContainerDefinition are
289+
created through a series of "builder" objects using a fluent API. Ultimately, even the functional API utilizes the
290+
builder API when you aren't using attributes to declare your ContainerDefinition. The intent of these builder objects
291+
is to provide a singular, correct method for creating implementations for the interfaces that make up a
292+
ContainerDefinition. In practice, these objects proved to be more difficult to use than expected, and led to an
293+
increase in maintenance requirements.
294+
295+
## Decision
296+
297+
The fluent API for creating definitions proved to be clunky to use, hard to test properly, and created lots of
298+
static analysis issues. In v3, these issues started to exacerbate when we needed to make changes to the underlying
299+
Definition interfaces and their corresponding builders. Instead of continuing with this subpar system, it was
300+
removed in v3 in favor of a concrete Factory class that ensures resultant Definitions are valid and proper without
301+
having to rely on a chain of fluent API calls.]]></contents>
302+
<codeAnnotations>
303+
<codeAnnotation>
304+
<class>Cspray\AnnotatedContainer\Definition\AliasDefinitionBuilder</class>
305+
</codeAnnotation>
306+
<codeAnnotation>
307+
<class>Cspray\AnnotatedContainer\Definition\ServiceDefinitionBuilder</class>
308+
</codeAnnotation>
309+
<codeAnnotation>
310+
<class>Cspray\AnnotatedContainer\Definition\ServicePrepareDefinitionBuilder</class>
311+
</codeAnnotation>
312+
<codeAnnotation>
313+
<class>Cspray\AnnotatedContainer\Definition\InjectDefinitionBuilder</class>
314+
</codeAnnotation>
315+
<codeAnnotation>
316+
<class>Cspray\AnnotatedContainer\Definition\ServiceDelegateDefinitionBuilder</class>
317+
</codeAnnotation>
318+
</codeAnnotations>
319+
<meta>
320+
<author>
321+
<name>Charles Sprayberry</name>
322+
<website>https://cspray.io</website>
323+
<githubProfile>https://github.com/cspray</githubProfile>
324+
</author>
325+
<deprecation>
326+
<since>2.4.0</since>
327+
<scheduledForRemoval>3.0.0</scheduledForRemoval>
328+
</deprecation>
329+
</meta>
330+
</architecturalDecision>
281331
</architecturalDecisions>

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"ext-libxml": "*",
1818
"composer-runtime-api": "^2",
1919
"brick/varexporter": "^0.3.7",
20-
"cspray/annotated-container-adr": "^3",
20+
"cspray/annotated-container-adr": "^3.3.2",
2121
"cspray/annotated-container-attribute": "^1.3",
2222
"cspray/annotated-target": "^v0.3",
2323
"cspray/precision-stopwatch": "^0.2.0",
@@ -29,7 +29,6 @@
2929
},
3030
"require-dev": {
3131
"illuminate/container": "^10.11",
32-
"jetbrains/phpstorm-attributes": "^1.1",
3332
"php-di/php-di": "^7.0",
3433
"rdlowrey/auryn": "^1.4",
3534
"roave/security-advisories": "dev-latest"

0 commit comments

Comments
 (0)