| From | Sent On | Attachments |
|---|---|---|
| 23 earlier messages | ||
| guil...@gmail.com | May 9, 2011 10:25 am | |
| Christopher Jones | May 9, 2011 10:27 am | |
| Stas Malyshev | May 9, 2011 10:30 am | |
| guil...@gmail.com | May 9, 2011 10:31 am | |
| Andi Gutmans | May 9, 2011 10:32 am | |
| Rasmus Lerdorf | May 9, 2011 10:38 am | |
| Ferenc Kovacs | May 9, 2011 10:43 am | |
| guil...@gmail.com | May 9, 2011 10:44 am | |
| guil...@gmail.com | May 9, 2011 10:47 am | |
| guil...@gmail.com | May 9, 2011 10:50 am | |
| Rasmus Lerdorf | May 9, 2011 10:53 am | |
| guil...@gmail.com | May 9, 2011 11:07 am | |
| Stas Malyshev | May 9, 2011 11:13 am | |
| Stas Malyshev | May 9, 2011 11:35 am | |
| Ferenc Kovacs | May 9, 2011 11:39 am | |
| guil...@gmail.com | May 9, 2011 11:52 am | |
| Stefan Marr | May 9, 2011 12:33 pm | |
| Lester Caine | May 9, 2011 2:41 pm | |
| dukeofgaming | May 9, 2011 3:00 pm | |
| Ilia Alshanetsky | May 9, 2011 3:09 pm | |
| Andi Gutmans | May 9, 2011 3:39 pm | |
| guil...@gmail.com | May 9, 2011 4:26 pm | |
| guil...@gmail.com | May 9, 2011 4:29 pm | |
| Lester Caine | May 9, 2011 5:25 pm | |
| Stas Malyshev | May 9, 2011 5:35 pm | |
| guil...@gmail.com | May 9, 2011 5:35 pm | |
| Ferenc Kovacs | May 9, 2011 5:35 pm | |
| guil...@gmail.com | May 9, 2011 5:55 pm | |
| Stas Malyshev | May 9, 2011 6:22 pm | |
| Pierrick Charron | May 9, 2011 8:03 pm | |
| Mike Willbanks | May 9, 2011 8:42 pm | |
| Pierrick Charron | May 9, 2011 8:50 pm | |
| Drak | May 9, 2011 9:09 pm | |
| Lester Caine | May 9, 2011 10:45 pm | |
| Pascal COURTOIS | May 9, 2011 11:06 pm | |
| Chad Fulton | May 10, 2011 12:01 am | |
| Ferenc Kovacs | May 10, 2011 12:43 am | |
| Lars Schultz | May 10, 2011 1:02 am | |
| Jordi Boggiano | May 10, 2011 1:10 am | |
| Lars Schultz | May 10, 2011 1:16 am | |
| Rasmus Lerdorf | May 10, 2011 1:44 am | |
| Sebastian Bergmann | May 10, 2011 2:34 am | |
| Ferenc Kovacs | May 10, 2011 2:39 am | |
| Sebastian Bergmann | May 10, 2011 2:40 am | |
| Ferenc Kovacs | May 10, 2011 3:04 am | |
| Drak | May 10, 2011 3:21 am | |
| Stefan Marr | May 10, 2011 4:04 am | |
| Arvids Godjuks | May 10, 2011 4:42 am | |
| Martin Scotta | May 10, 2011 5:28 am | |
| Martin Scotta | May 10, 2011 5:46 am | |
| Ferenc Kovacs | May 10, 2011 6:13 am | |
| Lars Schultz | May 10, 2011 6:37 am | |
| chri...@mohiva.com | May 10, 2011 6:55 am | |
| Lars Schultz | May 10, 2011 7:12 am | |
| Pas | May 10, 2011 7:19 am | |
| Alain Williams | May 10, 2011 7:19 am | |
| Christian Kaps | May 10, 2011 7:50 am | |
| Lester Caine | May 10, 2011 8:02 am | |
| Arvids Godjuks | May 10, 2011 8:07 am | |
| guil...@gmail.com | May 10, 2011 8:07 am | |
| Lester Caine | May 10, 2011 8:20 am | |
| Jonathan Bond-Caron | May 10, 2011 8:43 am | |
| Lester Caine | May 10, 2011 8:49 am | |
| Jonathan Bond-Caron | May 10, 2011 8:51 am | |
| Matthew Weier O'Phinney | May 10, 2011 8:56 am | |
| Matthew Weier O'Phinney | May 10, 2011 8:57 am | |
| Lester Caine | May 10, 2011 9:10 am | |
| Stas Malyshev | May 10, 2011 9:30 am | |
| guil...@gmail.com | May 10, 2011 9:46 am | |
| Zeev Suraski | May 10, 2011 9:47 am | |
| Sebastian Bergmann | May 10, 2011 10:14 am | |
| Sebastian Bergmann | May 10, 2011 10:15 am | |
| Matthew Weier O'Phinney | May 10, 2011 10:19 am | |
| Drak | May 10, 2011 10:29 am | |
| Lester Caine | May 10, 2011 11:12 am | |
| Christopher Jones | May 10, 2011 11:16 am | |
| Mike Robinson | May 10, 2011 11:20 am | |
| Ferenc Kovacs | May 10, 2011 11:21 am | |
| Lester Caine | May 10, 2011 11:22 am | |
| Ferenc Kovacs | May 10, 2011 11:27 am | |
| Ferenc Kovacs | May 10, 2011 11:28 am | |
| Matthew Weier O'Phinney | May 10, 2011 12:27 pm | |
| dukeofgaming | May 10, 2011 12:28 pm | |
| guil...@gmail.com | May 10, 2011 12:31 pm | |
| guil...@gmail.com | May 10, 2011 12:35 pm | |
| Drak | May 10, 2011 12:36 pm | |
| Ferenc Kovacs | May 10, 2011 12:40 pm | |
| Ferenc Kovacs | May 10, 2011 12:41 pm | |
| dukeofgaming | May 10, 2011 12:44 pm | |
| Rasmus Lerdorf | May 10, 2011 12:44 pm | |
| Drak | May 10, 2011 12:49 pm | |
| Rasmus Lerdorf | May 10, 2011 12:51 pm | |
| Chad Fulton | May 10, 2011 1:02 pm | |
| Christopher Jones | May 10, 2011 1:28 pm | |
| Lester Caine | May 10, 2011 2:32 pm | |
| Lars Schultz | May 10, 2011 3:03 pm | |
| guil...@gmail.com | May 10, 2011 3:27 pm | |
| Johannes Schlüter | May 10, 2011 5:01 pm | |
| Johannes Schlüter | May 10, 2011 5:15 pm | |
| Lester Caine | May 10, 2011 10:41 pm | |
| 70 later messages | ||
| Subject: | Re: [PHP-DEV] annotations again | |
|---|---|---|
| From: | Martin Scotta (mart...@gmail.com) | |
| Date: | May 10, 2011 5:46:50 am | |
| List: | net.php.lists.internals | |
Martin Scotta
On Tue, May 10, 2011 at 5:02 AM, Lars Schultz <lars...@toolpark.com>wrote:
Am 10.05.2011 09:44, schrieb Ferenc Kovacs:
On Tue, May 10, 2011 at 9:01 AM, Chad Fulton<chad...@gmail.com>
wrote:
On Mon, May 9, 2011 at 10:46 PM, Lester Caine<les...@lsces.co.uk>
wrote:
*IS* it clear by now that the majority of users want this?
For what it's worth, I still oppose Annotations.
And the argument
that 'You don't have to use it' does not wash either since once it has
been
pushed in, some of the libraries we are using are going to start
requiring
it simply because those developers do like the idea, but it does not necessarily mean that THE CURRENT PROPOSAL is the right way of doing it?
I especially oppose the complexity of the current proposal. One of the reasons I prefer PHPDoc to the proposed Annotations is because they're a simple key=>value syntax.
that would be the same argument that we don't need objects because we have arrays, and if you only need something to store your structures, then both can be used for that.
I'm already doing my coding in PHP - why do I have to code in a new sub-language when all I want is a litte bit of meta-data?
nobody is forcing you to use annotations, it won't replace the docblocks.
My main question is: Why do we need more than key=>value? When you say that "everyone" supports annotations (if that is true), are you sure they actually want more than key=>value?
at least Doctrine, Symfony and FLOW3 does. Sebastian expressed that he is fine with the current Docblock support for PHPUnit. the FLOW3 used to use single key values in the past, but I'm not familiar with the current situation.
for actual use-cases you can check http://blog.seric.at/2011/05/03/annotations-with-symfony2/ or
http://www.doctrine-project.org/docs/orm/2.0/en/reference/annotations-reference.html#annref-column
Discussion of this does not seem to appear in your "Why do we need Class Metadata?" section.
I also think that it would be a good idea to link or describe annotations in general, because it seems that nobody bothers to read that up without joining the conversation...
Tyrael
From the user-end perspective, what I don't understand is this:
What is the goal of having Annotations embedded in PHP? To nail down a common syntax? To provide an interface for meta-information on a class?
Why can't this be PHP code? Why should I have to learn a whole new kind of syntax? We already have a common syntax (PHP interface) for this as well as an interface (static Class-functions/Object-methods).
To explain what I mean, I'll use the example provided in the RFC. Could anyone please explain the advantages of having "passive" annotations over "active" PHP Code.
Annotated code integrates best with library/frameworks without the need to "extends" or "implements". Without annotation you will need to extend some class or to implement some interface. That means more code to write, more chances to shoot you foot.
With annotation your classes are unaware of the other components, which implies: * shorter, concise code => less bugs * no extra dependencies => easy to test
class UserFoo extends LibraryFoo { } class UserBar implements LibraryBar { // even worst you will need to write some methods here }
With annotations classes are "free" to live on you own herarchy
<LibraryFoo> class UserFoo extends UserFooBase { } <LibraryBar> class UserBar { }
<Entity("users")> class User { <Column("integer")> <Id> <GeneratedValue("AUTO")> protected $id;
// ...
<ManyToMany("Phonenumber")> protected $Phonenumbers; }
*** Example ***
class User implements EntityAnnotation { protected $id; protected $Phonenumbers;
public function getEntityAnnotation(){ return new User_EntityAnnotation(); } }
class User_EntityAnnotation { public function getEntityName(){ return 'users'; }
public function getColumnInfo($property){ switch( $property ) { case 'id': return array( 'column'=>'integer', 'isPrimary'=>true, 'autoIncrement'=>true );
case 'Phonenumbers': return array( 'manytomany'=>'Phonenumber' ); } } }
***************
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php





