mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
Fix the markup of the upgrade documentation
This commit is contained in:
+22
-22
@@ -10,36 +10,36 @@ Supported PHP Versions
|
|||||||
Breaking Changes & Removals
|
Breaking Changes & Removals
|
||||||
---------------------------
|
---------------------------
|
||||||
- **Removal of `::create` static method for type-based tags**
|
- **Removal of `::create` static method for type-based tags**
|
||||||
- The `create` static method has been removed from tag classes that represent type definitions, such as `@param` and `@return` tags. Most users will not be affected, as these methods are rarely used directly. The deprecation notice for these methods was present throughout v5.
|
- The `create` static method has been removed from tag classes that represent type definitions, such as `@param` and `@return` tags. Most users will not be affected, as these methods are rarely used directly. The deprecation notice for these methods was present throughout v5.
|
||||||
- **Migration:**
|
- **Migration:**
|
||||||
- If you are instantiating these tag objects directly, use the tag factory or the recommended construction pattern instead.
|
- If you are instantiating these tag objects directly, use the tag factory or the recommended construction pattern instead.
|
||||||
- Before:
|
- Before:
|
||||||
.. code-block:: php
|
.. code-block:: php
|
||||||
|
|
||||||
$tag = Param::create($body);
|
$tag = Param::create($body);
|
||||||
- After:
|
- After:
|
||||||
.. code-block:: php
|
.. code-block:: php
|
||||||
|
|
||||||
$factory = \phpDocumentor\Reflection\DocBlock\Tags\Factory\StandardTagFactory::createInstance();
|
$factory = \phpDocumentor\Reflection\DocBlock\Tags\Factory\StandardTagFactory::createInstance();
|
||||||
$tag = $factory->create('@param int $foo');
|
$tag = $factory->create('@param int $foo');
|
||||||
|
|
||||||
- **StandardTagFactory instantiation**
|
- **StandardTagFactory instantiation**
|
||||||
- `StandardTagFactory` must now be created via `createInstance()`.
|
- `StandardTagFactory` must now be created via `createInstance()`.
|
||||||
- **Migration:**
|
- **Migration:**
|
||||||
- Before:
|
- Before:
|
||||||
.. code-block:: php
|
.. code-block:: php
|
||||||
|
|
||||||
$factory = new StandardTagFactory();
|
$factory = new StandardTagFactory();
|
||||||
- After:
|
- After:
|
||||||
.. code-block:: php
|
.. code-block:: php
|
||||||
|
|
||||||
$factory = StandardTagFactory::createInstance();
|
$factory = StandardTagFactory::createInstance();
|
||||||
|
|
||||||
- **Removed methods**
|
- **Removed methods**
|
||||||
- `Method::getArguments` has been removed.
|
- `Method::getArguments` has been removed.
|
||||||
- `Method::create` has been removed.
|
- `Method::create` has been removed.
|
||||||
- **Migration:**
|
- **Migration:**
|
||||||
- Refactor code to use the new API for method arguments and creation.
|
- Refactor code to use the new API for method arguments and creation.
|
||||||
|
|
||||||
TypeResolver Upgrade
|
TypeResolver Upgrade
|
||||||
-------------------
|
-------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user