Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-30 Thread Stanislav Malyshev
Hi! > As far as I know, the PHP core has never dictated docblock contents, or > any other aspect of coding style. Such decisions are up to "the True, but having common standards which include docblocks in not unheard of in programming ecosystems. In Java world, prescribing docblock contents - no

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-30 Thread Pierre Joye
On Sat, Apr 30, 2016 at 3:52 PM, Lester Caine wrote: > On 30/04/16 09:38, Pierre Joye wrote: >>> Sorry if you didn't spend the last 6+ years of your free time >>> > < >> https://github.com/phpDocumentor/phpDocumentor2/commit/66dc9069085dcea957508f84e9c79eaf4c234586 >>> > >>> > (yes, that is an imp

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-30 Thread Lester Caine
On 30/04/16 09:38, Pierre Joye wrote: >> Sorry if you didn't spend the last 6+ years of your free time >> > < > https://github.com/phpDocumentor/phpDocumentor2/commit/66dc9069085dcea957508f84e9c79eaf4c234586 >> > >> > (yes, that is an import) maintaining an open-source project focused on >> > annot

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-30 Thread Pierre Joye
On Apr 29, 2016 3:42 PM, "Marco Pivetta" wrote: > > Hey Lester, > > Sorry if you didn't spend the last 6+ years of your free time > < https://github.com/phpDocumentor/phpDocumentor2/commit/66dc9069085dcea957508f84e9c79eaf4c234586 > > (yes, that is an import) maintaining an open-source project focu

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-30 Thread Lester Caine
On 29/04/16 18:00, Rowan Collins wrote: >> But in the second example just where does >> the error redirect traffic? At least with in-line checks you control >> flow ... > > A good question. As such, the annotation doesn't execute any code in the > current proposal, it just allows tools to inspect

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-29 Thread Rowan Collins
Lester Caine wrote on 29/04/2016 17:50: On 29/04/16 16:42, Rowan Collins wrote: function foo($a) { if ( $a < 42 ) { throw new Exception; } // Must not reach The Answer ... } vs <> // Must not reach The Answer function foo($a) { ... } The first version is my current code base, although it's un

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-29 Thread Ryan Pallas
On Fri, Apr 29, 2016 at 10:50 AM, Lester Caine wrote: > On 29/04/16 16:42, Rowan Collins wrote: > > function foo($a) { > > if ( $a < 42 ) { throw new Exception; } // Must not reach The Answer > > ... > > } > > > > vs > > > > <> // Must not reach The Answer > > function foo($a) { ... } > > The fir

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-29 Thread Lester Caine
On 29/04/16 16:42, Rowan Collins wrote: > function foo($a) { > if ( $a < 42 ) { throw new Exception; } // Must not reach The Answer > ... > } > > vs > > <> // Must not reach The Answer > function foo($a) { ... } The first version is my current code base, although it's unlikely to throw an except

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-29 Thread Ryan Pallas
On Fri, Apr 29, 2016 at 9:18 AM, Lester Caine wrote: > On 29/04/16 14:51, Rowan Collins wrote: > > Lester Caine wrote on 29/04/2016 14:18: > >> But where will annotations like @range(0,110) fit in the new model? > >> Along with the likes of '@notnull' and similar annotations that are also > >> cu

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-29 Thread guilhermebla...@gmail.com
Lester, I understand that IDEs are doing a nice job over the toolset already created around documentation. That's what phpdoc and friends do. Also, if you take PHPStorm, it also helps you add Doctrine annotations with ease. But this is just one IDE, and that's what they're supposed to do; help dev

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-29 Thread Rowan Collins
Hi Lester, Lester Caine wrote on 29/04/2016 16:18: I think that is part of the problem here. IDE's are currently making quite good use of existing annotation text, but if they have to be switched to modes where some other option takes priority then once again all the code has to be reworked ...

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-29 Thread Lester Caine
On 29/04/16 14:51, Rowan Collins wrote: > Lester Caine wrote on 29/04/2016 14:18: >> But where will annotations like @range(0,110) fit in the new model? >> Along with the likes of '@notnull' and similar annotations that are also >> currently being planned to be spread around the rest of the code? I

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-29 Thread Rowan Collins
Lester Caine wrote on 29/04/2016 14:18: But where will annotations like @range(0,110) fit in the new model? Along with the likes of '@notnull' and similar annotations that are also currently being planned to be spread around the rest of the code? If a variable is defined via the metadata as 'not

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-29 Thread Lester Caine
On 29/04/16 13:49, Benjamin Eberlei wrote: > Lester, nobody wants to move phpdoc out of the *doc* comment. Its still > documentation. It will stay,. > > We want to move the "annotations" out of the docblocks that are evaluated > at runtime for configuration. Thats two different things. That is wha

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-29 Thread Benjamin Eberlei
On Fri, Apr 29, 2016 at 2:36 PM, Rowan Collins wrote: > Lester Caine wrote on 29/04/2016 13:02: > >> In my book this is DIRECTLY relevant to the current discussion! >> >> We have been adding attributes via docBloc annotation since PHP4 days. >> This has partly been accepted as the default way of

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-29 Thread Rowan Collins
Lester Caine wrote on 29/04/2016 13:02: In my book this is DIRECTLY relevant to the current discussion! We have been adding attributes via docBloc annotation since PHP4 days. This has partly been accepted as the default way of doing it and phpDoc was originally part of the PEAR support structure

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-29 Thread Lester Caine
On 29/04/16 10:42, Rowan Collins wrote: > Lester Caine wrote on 29/04/2016 10:17: >> And it would be nice if you actually checked out just how phpdocumentor1 >> worked and explain why I can't produce >> http://lsces.org.uk/bitweaverdocsPHP/index.html with phpDocumentor2 ... > > The simple fact is

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-29 Thread Rowan Collins
Lester Caine wrote on 29/04/2016 10:17: And it would be nice if you actually checked out just how phpdocumentor1 worked and explain why I can't produce http://lsces.org.uk/bitweaverdocsPHP/index.html with phpDocumentor2 ... The simple fact is that this is completely off-topic for this list. Y

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-29 Thread Lester Caine
On 29/04/16 09:41, Marco Pivetta wrote: > Sorry if you didn't spend the last 6+ years of your free time > > (yes, that is an import) maintaining an open-source project focused on > annotations-based do

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-29 Thread Marco Pivetta
Hey Lester, Sorry if you didn't spend the last 6+ years of your free time (yes, that is an import) maintaining an open-source project focused on annotations-based documentation. Marco Pivetta http:/

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-29 Thread Lester Caine
On 29/04/16 03:20, Marco Pivetta wrote: > > This needs to be agreed in the core first > > Meh, no. Let someone that actually worked for years and years on the > specific problem to solve that, please: accumulated experience across all > use-cases is the best resource you can get here, and he know

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-28 Thread Marco Pivetta
> This needs to be agreed in the core first Meh, no. Let someone that actually worked for years and years on the specific problem to solve that, please: accumulated experience across all use-cases is the best resource you can get here, and he knows his stuff. > Is composer now the only supporte

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-28 Thread Rowan Collins
Lester Caine wrote on 28/04/2016 08:21: On 28/04/16 06:35, Marco Pivetta wrote: This is what Mike van Riel was working on with PSR-5. Work has been suspended atm, but I'd still go look at that first. Sorry but php-fig is not PHP and sme of the 'standards' created there are at odds with the pref

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-28 Thread Lester Caine
On 28/04/16 06:35, Marco Pivetta wrote: > This is what Mike van Riel was working on with PSR-5. Work has been > suspended atm, but I'd still go look at that first. Sorry but php-fig is not PHP and sme of the 'standards' created there are at odds with the preferred practices in the PHP code ... whi

Re: [PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-27 Thread Marco Pivetta
Hey Lester, This is what Mike van Riel was working on with PSR-5. Work has been suspended atm, but I'd still go look at that first. On Apr 27, 2016 13:47, "Lester Caine" wrote: On 25/04/16 20:24, Rasmus Schultz wrote: > Check here to see what we did for php-annotations: > > https://github.com/ph

[PHP-DEV] PHP Attributes -> docBloc alternatives ...

2016-04-27 Thread Lester Caine
On 25/04/16 20:24, Rasmus Schultz wrote: > Check here to see what we did for php-annotations: > > https://github.com/php-annotations/php-annotations/blob/master/docs/CustomAnnotations.rst#usageannotation > > It's somewhat similar to how C# does it, and it has worked quite nicely. After some fun