Yii Framework Forum: Php Framework Interoperability Group - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Php Framework Interoperability Group Have you heard of these guys?

#1 User is offline   fleuryc 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 33
  • Joined: 09-November 11

Posted 10 November 2012 - 09:32 AM

Hi there,

I just bumped into this : https://github.com/p...g/fig-standards .

I absolutely don't know if this is a active community, since I'm not in the mailing list (for now), but I see all the main PHP frameworks (and others too) and not Yii. I think, as a professionnal framework, and if this 'group' is actually doing something, Yii should probably take part in it.

If it is not interresting for the Yii framework community to take part in this group, at least have a look at the coding standards they have proposed : https://github.com/p...master/accepted wich can be interresting (especially the idea of havin different levels of standard) to use in Yii.

Just dropping my 2 cents here...

Cheers!
0

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,735
  • Joined: 17-January 09
  • Location:Russia

Posted 10 November 2012 - 04:45 PM

It's not that active but active enough. So far they've worked out three standards including very good PSR-0 that we'll adopt in Yii2. PSR-1 and PSR-2 are a bit too subjective to be really considered a standard for Yii2 so've strucutered out own one after these but worked out our own rules.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#3 User is offline   fleuryc 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 33
  • Joined: 09-November 11

Posted 11 November 2012 - 09:48 AM

Great, good to know!

In my opinion, coding standard should not be too restrictive, but must exist especially in a framework where contributor's extensions or plugins play a important role.

In that way, the PSR-0 is a very good minimal coding standard. Maybe that minimal should be enforced in the extensions to ensure a minimal quality and coherence.

Cheers!
0

#4 User is offline   Orteko 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 34
  • Joined: 02-March 10

Posted 13 November 2012 - 06:54 PM

View Postsamdark, on 10 November 2012 - 04:45 PM, said:

It's not that active but active enough. So far they've worked out three standards including very good PSR-0 that we'll adopt in Yii2. PSR-1 and PSR-2 are a bit too subjective to be really considered a standard for Yii2 so've strucutered out own one after these but worked out our own rules.


I'm interested to know how yii will differ from PSR-1, it seems pretty sensible and very minimal.

I suspect i'm almost certainly in the minority however i'd love to see yii embrace PSR-2 as well - while some of the decisions taken are perhaps not to everyones taste at least it does move towards parity with the PHP community at large.

The one thing that I hope does change in the new Yii standard is the introduction of a bit more whitespace - personally I find a lot of the current code difficult to follow with the eye.

The lack of spaces after commas in most cases being particularly irksome as it flies against the common usage in the english language :)
0

#5 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,735
  • Joined: 17-January 09
  • Location:Russia

Posted 14 November 2012 - 03:23 AM

http://www.yiiframew...rd/page__st__60
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#6 User is offline   ekerazha 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 526
  • Joined: 10-October 08
  • Location:European Union

Posted 15 November 2012 - 11:48 AM

View PostOrteko, on 13 November 2012 - 06:54 PM, said:

i'd love to see yii embrace PSR-2 as well

I will never use brackets for single-line statements inside structures. Brackets for structures exist in order to wrap multiple lines, no multiple lines no brackets. Coding standards which use brackets for single-line statements are obtuse (this includes PSR-2).
Yii user #37
0

#7 User is offline   Orteko 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 34
  • Joined: 02-March 10

Posted 15 November 2012 - 06:18 PM

View Postekerazha, on 15 November 2012 - 11:48 AM, said:

I will never use brackets for single-line statements inside structures. Brackets for structures exist in order to wrap multiple lines, no multiple lines no brackets. Coding standards which use brackets for single-line statements are obtuse (this includes PSR-2).


From my perspective I actually find it easier to follow simply because the brackets are applied consistently regardless of the number of statements inside the structure.

Regardless, I suspect that the thread referenced by samdark above has already done this topic to death :)
1

#8 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,355
  • Joined: 12-October 09
  • Location:Croatia

Posted 16 November 2012 - 03:34 AM

yes there are already few topics on brackets issues... we decided for single command brackets mainly because this allows to set a debuger breakpoint on that line.. if there are no brackets you cannot set a breakpoint on that line that in turn makes debugging very hard sometimes.
Find more about me.... btw. Do you know your WAN IP?
1

#9 User is offline   njasm 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 09-November 11

Posted 16 November 2012 - 02:26 PM

yeah I would like to see PSR-0,1 and 2 into yii2 it feels natural to me. but hey that's just me! :)
0

#10 User is offline   Stratigos 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 28
  • Joined: 14-September 11
  • Location:BROOKLYN

Posted 22 April 2014 - 11:10 AM

View PostOrteko, on 15 November 2012 - 06:18 PM, said:

From my perspective I actually find it easier to follow simply because the brackets are applied consistently regardless of the number of statements inside the structure.Regardless, I suspect that the thread referenced by samdark above has already done this topic to death :)



View PostMaurizio Domba Cerin, on 16 November 2012 - 03:34 AM, said:

yes there are already few topics on brackets issues... we decided for single command brackets mainly because this allows to set a debuger breakpoint on that line.. if there are no brackets you cannot set a breakpoint on that line that in turn makes debugging very hard sometimes.


+1 to these, also, following such standards is much easier on the eyes! especially when reading code you wrote a year ago, or someone else's code they wrote 5 years ago.
0

#11 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,735
  • Joined: 17-January 09
  • Location:Russia

Posted 22 April 2014 - 03:04 PM

Lots of time passed since last post in the topic. Changes since then:

1. Yii is PHP-FIG member. I'm representative.
2. Yii2 adopted PSR-1, PSR-2, PSR-4.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users