.. _property-hook-cannot-be-both-abstract-and-final: Property hook cannot be both abstract and final ----------------------------------------------- .. meta:: :description: Property hook cannot be both abstract and final: This error is emitted when a property is defined in an interface, with the final option. :og:image: https://php-errors.readthedocs.io/en/latest/_static/logo.png :og:type: article :og:title: Property hook cannot be both abstract and final :og:description: This error is emitted when a property is defined in an interface, with the final option :og:url: https://php-errors.readthedocs.io/en/latest/messages/property-hook-cannot-be-both-abstract-and-final.html :og:locale: en :twitter:card: summary_large_image :twitter:site: @exakat :twitter:title: Property hook cannot be both abstract and final :twitter:description: Property hook cannot be both abstract and final: This error is emitted when a property is defined in an interface, with the final option :twitter:creator: @exakat :twitter:image:src: https://php-errors.readthedocs.io/en/latest/_static/logo.png .. raw:: html Description ___________ This error is emitted when a property is defined in an interface, with the final option. There, a property hook is automatically abstract, as it is part of an interface, so the ``abstract`` option is understated. In a class or a trait, the reported error is that ``abstract`` is not allowed on a property hook. Example _______ .. code-block:: php Solutions _________ + Remove the ``final`` option from the property hook. Related Error Messages ______________________ + :ref:`cannot-use-the-abstract-modifier-on-a-property-hook` Changed Behavior ________________ This error may appear following an evolution in behavior, in previous versions. See ` `_.