Skip to content

Commit

Permalink
Mark existing ActiveProfiles related code as deprecated (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
cspray authored Feb 26, 2024
1 parent 831cf79 commit 79ba5d1
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 5 deletions.
56 changes: 52 additions & 4 deletions known-issues.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.30.0@d0bc6e25d89f649e4f36a534f330f8bb4643dd69">
<file src="src/Bootstrap/Bootstrap.php">
<DeprecatedClass occurrences="4">
<code>ActiveProfiles</code>
<code>ActiveProfiles</code>
<code>ActiveProfiles</code>
<code>ActiveProfiles</code>
</DeprecatedClass>
<DeprecatedInterface occurrences="1">
<code>class($profiles) implements ActiveProfiles {</code>
</DeprecatedInterface>
</file>
<file src="src/Bootstrap/ComposerJsonScanningThirdPartyInitializerProvider.php">
<MixedArrayAccess occurrences="1">
<code>$composerData['extra']</code>
Expand All @@ -18,7 +29,25 @@
<code>isDot</code>
</UndefinedMethod>
</file>
<file src="src/Bootstrap/ContainerCreatedObserver.php">
<DeprecatedClass occurrences="1">
<code>ActiveProfiles</code>
</DeprecatedClass>
</file>
<file src="src/Bootstrap/PostAnalysisObserver.php">
<DeprecatedClass occurrences="1">
<code>ActiveProfiles</code>
</DeprecatedClass>
</file>
<file src="src/Bootstrap/PreAnalysisObserver.php">
<DeprecatedClass occurrences="1">
<code>ActiveProfiles</code>
</DeprecatedClass>
</file>
<file src="src/Bootstrap/ServiceWiringObserver.php">
<DeprecatedClass occurrences="1">
<code>ActiveProfiles</code>
</DeprecatedClass>
<LessSpecificReturnStatement occurrences="1">
<code>$services</code>
</LessSpecificReturnStatement>
Expand Down Expand Up @@ -79,6 +108,9 @@
<ArgumentTypeCoercion occurrences="1">
<code>$profiles</code>
</ArgumentTypeCoercion>
<DeprecatedClass occurrences="1">
<code>ActiveProfiles</code>
</DeprecatedClass>
<PossiblyInvalidArgument occurrences="3">
<code>$configOption</code>
<code>$configOption</code>
Expand All @@ -104,11 +136,17 @@
</MixedArgument>
</file>
<file src="src/ContainerFactory/AbstractContainerFactory.php">
<DeprecatedClass occurrences="3">
<DeprecatedClass occurrences="6">
<code>ActiveProfiles</code>
<code>ActiveProfiles</code>
<code>ActiveProfiles</code>
<code>ConfigurationDefinition</code>
<code>ConfigurationDefinition</code>
<code>ConfigurationDefinition</code>
</DeprecatedClass>
<DeprecatedInterface occurrences="1">
<code>class($profiles) implements ActiveProfiles {</code>
</DeprecatedInterface>
<MixedArgument occurrences="6">
<code>$inject-&gt;getValue()</code>
<code>$inject-&gt;getValue()</code>
Expand All @@ -134,7 +172,9 @@
<code>$method</code>
<code>$value-&gt;name</code>
</ArgumentTypeCoercion>
<DeprecatedClass occurrences="1">
<DeprecatedClass occurrences="3">
<code>ActiveProfiles</code>
<code>ActiveProfiles</code>
<code>ConfigurationDefinition</code>
</DeprecatedClass>
<MixedArgument occurrences="1">
Expand Down Expand Up @@ -186,7 +226,8 @@
<code>$definition-&gt;getTargetIdentifier()-&gt;getName()</code>
<code>$method</code>
</ArgumentTypeCoercion>
<DeprecatedClass occurrences="1">
<DeprecatedClass occurrences="2">
<code>ActiveProfiles</code>
<code>ConfigurationDefinition</code>
</DeprecatedClass>
<InternalProperty occurrences="8">
Expand Down Expand Up @@ -280,7 +321,9 @@
<code>$method</code>
<code>$parameter</code>
</ArgumentTypeCoercion>
<DeprecatedClass occurrences="1">
<DeprecatedClass occurrences="3">
<code>ActiveProfiles</code>
<code>ActiveProfiles</code>
<code>ConfigurationDefinition</code>
</DeprecatedClass>
<MissingClosureReturnType occurrences="1">
Expand Down Expand Up @@ -405,6 +448,11 @@
<code>$profiles</code>
</MixedArgument>
</file>
<file src="src/Profiles/CsvActiveProfilesParser.php">
<DeprecatedInterface occurrences="1">
<code>CsvActiveProfilesParser</code>
</DeprecatedInterface>
</file>
<file src="src/Serializer/ContainerDefinitionSerializer.php">
<ArgumentTypeCoercion occurrences="2">
<code>$name</code>
Expand Down
2 changes: 2 additions & 0 deletions src/Profiles/ActiveProfiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
/**
* An implicitly shared Service provided by Annotated Container that provides the list of active profiles when the
* Container was created.
*
* @deprecated
*/
interface ActiveProfiles {

Expand Down
2 changes: 1 addition & 1 deletion src/Profiles/ActiveProfilesBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use InvalidArgumentException;

/**
* The preferred mechanism for creating a list of active profiles when creating a Container.
* @deprecated
*/
final class ActiveProfilesBuilder {

Expand Down
2 changes: 2 additions & 0 deletions src/Profiles/ActiveProfilesParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
*
* It is recommended to use this type of implementation over ActiveProfilesBuilder when your list of active profiles is
* stored on the running environment. For example, in an environment variable or some other hard-coded string.
*
* @deprecated
*/
interface ActiveProfilesParser {

Expand Down
2 changes: 2 additions & 0 deletions src/Profiles/CsvActiveProfilesParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

/**
* An ActiveProfilesParser that will take a comma-separated string and turn it into a list of active profiles.
*
* @deprecated
*/
final class CsvActiveProfilesParser implements ActiveProfilesParser {

Expand Down

0 comments on commit 79ba5d1

Please sign in to comment.