{"action":"opened","issue":{"url":"https://api.github.com/repos/3rdpartyeve/phealng/issues/42","repository_url":"https://api.github.com/repos/3rdpartyeve/phealng","labels_url":"https://api.github.com/repos/3rdpartyeve/phealng/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/3rdpartyeve/phealng/issues/42/comments","events_url":"https://api.github.com/repos/3rdpartyeve/phealng/issues/42/events","html_url":"https://github.com/3rdpartyeve/phealng/issues/42","id":174583707,"number":42,"title":"@optional conflicts with Symfony Annotations","user":{"login":"sarelvdwalt","id":2071493,"avatar_url":"https://avatars.githubusercontent.com/u/2071493?v=3","gravatar_id":"","url":"https://api.github.com/users/sarelvdwalt","html_url":"https://github.com/sarelvdwalt","followers_url":"https://api.github.com/users/sarelvdwalt/followers","following_url":"https://api.github.com/users/sarelvdwalt/following{/other_user}","gists_url":"https://api.github.com/users/sarelvdwalt/gists{/gist_id}","starred_url":"https://api.github.com/users/sarelvdwalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarelvdwalt/subscriptions","organizations_url":"https://api.github.com/users/sarelvdwalt/orgs","repos_url":"https://api.github.com/users/sarelvdwalt/repos","events_url":"https://api.github.com/users/sarelvdwalt/events{/privacy}","received_events_url":"https://api.github.com/users/sarelvdwalt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-01T17:43:02Z","updated_at":"2016-09-01T17:43:02Z","closed_at":null,"body":"Hi, might I suggest removing, or renaming, the annotation/tag used in things like Pheal/Core/RowSet.php called \"@optional\" ?\r\n\r\nSee code below:\r\n\r\n```php\r\n    /**\r\n     * initialize the rowset\r\n     * @param \\SimpleXMLElement $xml\r\n     * @param null $name\r\n     * @param string $rowname\r\n     * @optional String $name\r\n     * @optional String $rowname\r\n     */\r\n    public function __construct($xml, $name = null, $rowname = 'row')\r\n```\r\n\r\nWhen using this, in conjunction with the widely used Doctrine Annotation system, a conflict occurs where the @optional tag is used with Doctrine itself.\r\n\r\nThe error message would read:\r\n```[Semantical Error] The annotation \"@optional\" in method Pheal\\Core\\RowSet::__construct() was never imported. Did you maybe forget to add a \"use\" statement for this annotation?```\r\n\r\nA way to get around this would be to either:\r\n\r\n1. Remove the @optional tag from the docblocks, and replace them with the standard @param, but stating it's optional afterward in the description part of the line.\r\n2. Add the ```@IgnoreAnnotation(\"optional\") ``` part in the class's docblock, as shown below:\r\n\r\n```php\r\nnamespace Pheal\\Core;\r\n\r\n/**\r\n * class to implement EVE API RowSets\r\n * @IgnoreAnnotation(\"optional\")\r\n */\r\nclass RowSet extends \\ArrayObject implements CanConvertToArray\r\n{\r\n```\r\n\r\nThe second option, although it seems cleaner, is a bit counter intuitive as it's only Doctrine that seems to use that ignore facility.\r\n\r\nI am willing to do the updates to the code and send you a pull request if you'd like? But I just wanted to check with you, the owner of the project, first."}}
{"actor":{"display_login":"sarelvdwalt"}}