Skip to content

added @deprecated to the old form classes #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Form/AbstractFormHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

/**
* @author Yannick de Lange <[email protected]>
*
* @deprecated Use the HandlerTypeInterface instead. Will be removed in version 2.0.
*/
abstract class AbstractFormHandler implements NamedFormHandlerInterface
{
Expand Down
2 changes: 2 additions & 0 deletions src/Form/Exception/FormNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

/**
* @author Yannick de Lange <[email protected]>
*
* @deprecated Use the class InvalidHandlerTypeException instead. Will be removed in version 2.0.
*/
class FormNotFoundException extends \RuntimeException
{
Expand Down
2 changes: 2 additions & 0 deletions src/Form/FormFailureHandlerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
/**
* @author Iltar van der Berg <[email protected]>
* @author Yannick de Lange <[email protected]>
*
* @deprecated Use the HandlerConfigInterface instead. Will be removed in version 2.0.
*/
interface FormFailureHandlerInterface
{
Expand Down
9 changes: 9 additions & 0 deletions src/Form/FormHandlerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@
*/
namespace Hostnet\Component\Form;

use Hostnet\Component\FormHandler\HandlerTypeInterface;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormTypeInterface;

@trigger_error(sprintf(
'%s is deprecated, use %s instead.',
FormHandlerInterface::class,
HandlerTypeInterface::class
), E_USER_DEPRECATED);

/**
* @author Iltar van der Berg <[email protected]>
* @author Yannick de Lange <[email protected]>
*
* @deprecated Use the HandlerTypeInterface instead. Will be removed in version 2.0.
*/
interface FormHandlerInterface
{
Expand Down
2 changes: 2 additions & 0 deletions src/Form/FormProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
/**
* @author Iltar van der Berg <[email protected]>
* @author Yannick de Lange <[email protected]>
*
* @deprecated Use the HandlerConfigInterface instead. Will be removed in version 2.0.
*/
interface FormProviderInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Form/FormSuccesHandlerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @author Iltar van der Berg <[email protected]>
* @author Yannick de Lange <[email protected]>
*
* @deprecated Use {@see FormSuccessHandlerInterface} instead.
* @deprecated Use the HandlerConfigInterface instead. Will be removed in version 2.0.
*/
interface FormSuccesHandlerInterface extends FormSuccessHandlerInterface
{
Expand Down
2 changes: 2 additions & 0 deletions src/Form/FormSuccessHandlerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
/**
* @author Iltar van der Berg <[email protected]>
* @author Yannick de Lange <[email protected]>
*
* @deprecated Use the HandlerConfigInterface instead. Will be removed in version 2.0.
*/
interface FormSuccessHandlerInterface
{
Expand Down
2 changes: 2 additions & 0 deletions src/Form/NamedFormHandlerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

/**
* @author Yannick de Lange <[email protected]>
*
* @deprecated Use the HandlerConfigInterface instead. Will be removed in version 2.0.
*/
interface NamedFormHandlerInterface extends FormHandlerInterface
{
Expand Down
2 changes: 2 additions & 0 deletions src/Form/Simple/SimpleFormProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
/**
* @author Iltar van der Berg <[email protected]>
* @author Yannick de Lange <[email protected]>
*
* @deprecated Use the HandlerFactoryInterface instead. Will be removed in version 2.0.
*/
class SimpleFormProvider implements FormProviderInterface
{
Expand Down
2 changes: 2 additions & 0 deletions src/FormHandler/HandlerTypeAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
/**
* Wrapper class around the old FormHandlerInterface classes. This provides the
* BC layer so they can be used with the new handler factory.
*
* @deprecated Support for FormHandlerInterface will be removed in version 2.0.
*/
final class HandlerTypeAdapter implements HandlerTypeInterface
{
Expand Down