On 07/31/2016 02:19 PM, 'Alexander Makarov' via PHP Framework
Interoperability Group wrote:
The change is part of
https://github.com/php-fig/fig-standards/commit/50a3d046baa5143546dc95bf5930d3523f56be6a,
made after discussion in a pull request:
https://github.com/php-fig/fig-standards/pull/730#discussion_r57308607 and
getting some stats on current state of things.
It's about blank like right after <?php:
<?php
declare(strict_types=1);
namespace Vendor\Package;
use Vendor\Package\{ClassA as A, ClassB, ClassC as C};
use Vendor\Package\Namespace\ClassD as D;
use function Vendor\Package\{functionA, functionB, functionC};
use const Vendor\Package\{ConstantA, ConstantB, ConstantC};
class Foo extends Bar implements FooInterface
{
There are three options:
- Enforce blank line. It was like that initially. Style matches
Laravel, Symfony and Composer.
- Enforce no blank line. Style matches Yii, Aura, Zend, Slim, Propel,
PPI, Doctrine and CakePHP.
- Do not enforce anything. That's what it is after commit.
Since both projects enforcing and not enforcing blank line
<https://github.com/php-fig/fig-standards/pull/730#discussion_r57308607>
are major, preliminary decision is not to enforce any particular style
i.e. both are valid.
It's definitely preliminary and could be decided otherwise based on
the survey to be conducted. Still, it's good to discuss it prior to
survey so I'd like your opinions voiced.
Thanks!
Drupal has since tentatively adopted the blank-line style, based in part
on the discussion in that thread.
https://www.drupal.org/node/2248463
My own position and that of Drupal's has already been stated in both
threads, but to reiterate in short:
* Picking one is important. A style guide that has a lot of "either/or"
in it is weaker, less effective, and harder to both document and
implement. Yes its "personal preference", but so is the entire spec.
That's the point. :-)
* The extra space is good, as it makes the entire header section much
more consistent. That's easier to remember and easier to document/specify.
--Larry Garfield
--
You received this message because you are subscribed to the Google Groups "PHP
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/php-fig/5fb52be0-ce96-2b82-371c-9997920db87f%40garfieldtech.com.
For more options, visit https://groups.google.com/d/optout.