Re: [PHP-DEV] [RFC][Discuss] Arrow Functions

2017-01-31 Thread Marco Pivetta
Just throwing it in here while commuting, so it's a top-post with no references. Saw it yesterday on reddit (!!! Reddit being useful for once !!!): $callback = |$x| => $x ** 2; On 31 Jan 2017 22:44, "Bob Weinand" wrote: > > > Am 31.01.2017 um 19:41 schrieb Christoph M. Becker : > > > > On 31.01.

Re: [PHP-DEV] PHP's support to contravariance and covariance

2017-01-31 Thread Marco Pivetta
On 1 Feb 2017 12:27 a.m., "Christoph M. Becker" wrote: On 31.01.2017 at 21:47, Levi Morrison wrote: >> Is there anything else that I am missing? > > Sadly, yes. Consider the following snippet: > > class A { > function method(): B; > } > > class B extends A { > functio

Re: [fw-general] about list

2017-01-30 Thread Marco Pivetta
It's still working, but moderation is kinda meh, so there's loads of spam posts by bots :-( I would suggest posting questions directly on Github for easier cross-referencing and discoverability. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Mon, Jan 30, 20

Re: [doctrine-user] WEEK with DATE_SUB() argument problem

2017-01-24 Thread Marco Pivetta
INTERVAL 1 WEEK doesn't parse in DQL. See https://github.com/doctrine/doctrine2/blob/b181228d69a78372693ee0f3dd2285e0e3771bca/lib/Doctrine/ORM/Query/AST/Functions/DateAddFunction.php#L28 Also, please note that you just select `a`, not `a.*`. Marco Pivetta http://twitter.com/Ocramius

Re: [doctrine-user] WEEK with DATE_SUB() argument problem

2017-01-23 Thread Marco Pivetta
` "[Syntax Error] line 0, col 134` Please provide: * your DQL * your expected SQL Also, I would strongly suggest to write an integration test relying on the DQL parser ;-) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Mon, Jan 23, 2017 at 12:17 PM, Abir B

Re: [doctrine-user] Extending \Doctrine\DBAL\Connection, private methods

2017-01-19 Thread Marco Pivetta
Also: copying the method is perfectly OK :-) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Thu, Jan 19, 2017 at 2:54 PM, Peter Bowyer wrote: > Thanks Marco. > > Peter > > On Thursday, 19 January 2017 11:58:40 UTC, Marco Pivetta wrote: >> &g

Re: [doctrine-user] Extending \Doctrine\DBAL\Connection, private methods

2017-01-19 Thread Marco Pivetta
The correct approach would be to extract the method into either: * a static utility * an injected dependency Reuse through `protected` only leads to a massive amount of coupling, and more BC concerns for us. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Thu, Jan

Re: [PHP-DEV] [RFC][DISCUSSION] - Disallow Multiple Constructor Calls

2017-01-17 Thread Marco Pivetta
> Any suggestions are highly welcome. Thank you. > > Regards, > Tim This looks much better than the initial proposal, thanks! Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [PHP-DEV] bugsnet cleanup

2017-01-17 Thread Marco Pivetta
On Tue, Jan 17, 2017 at 5:35 PM, Stanislav Malyshev wrote: > What prevents you from being able to create proper issues on bugs.php.net? > Nothing: it's just a forgotten corner of the web, like our Jira was. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [PHP-DEV] bugsnet cleanup

2017-01-17 Thread Marco Pivetta
tands, I only go to bugs.php.net to create a github issue where I link it as reference. Just my 2 cents. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [PHP-DEV] Unsetting declared fields

2017-01-16 Thread Marco Pivetta
ts()` to skip tests, run tests, load polyfills, etc. My best guess is that the API shouldn't change though. That's the safest BC approach, whereas new behavior can be defined with a completely new function (for example: `property_is_statically_defined()`, `property_value_is_assigned()`, etc.).

Re: [PHP-DEV] Unsetting declared fields

2017-01-16 Thread Marco Pivetta
On Mon, Jan 16, 2017 at 9:49 AM, Michał Brzuchalski wrote: > Hi Marco, > > 2017-01-16 0:27 GMT+01:00 Marco Pivetta : > >> Hi Wes, >> >> This has been discussed before, and it's currently used to intercept >> access >> to properties. Since we

Re: [PHP-DEV] Unsetting declared fields

2017-01-15 Thread Marco Pivetta
Almost forgot: these examples apply also to private and protected properties. That's currently the only way to make the behavior consistent across friend objects (same scope). On Mon, Jan 16, 2017 at 12:27 AM, Marco Pivetta wrote: > Hi Wes, > > This has been discussed before, and

Re: [PHP-DEV] Unsetting declared fields

2017-01-15 Thread Marco Pivetta
set_properties.phpt We can most probably get rid of this weird behavior once property accessors are in the language. Greets, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Mon, Jan 16, 2017 at 12:20 AM, Wes wrote: > Hello elephpants. > > Currently PHP allow

Re: [doctrine-user] About the order of lifecycle event listener calls

2017-01-13 Thread Marco Pivetta
This is currently not supported by the EventManager, as our implementation is simplistic for performance reasons. Still, it is achieved anyway by registering the listeners in the correct order. On 13 Jan 2017 9:09 p.m., "Guite" wrote: > Hi all, > > I want to know whether and how it is possible t

Re: [PHP-DEV] Explicit constructor call and polymorphic dispatch

2017-01-12 Thread Marco Pivetta
; Tim > > > On 12 Jan 2017, at 22:39, Fleshgrinder wrote: > > > > On 1/12/2017 10:13 PM, Marco Pivetta wrote: > >> Hey Richard, > >> > >> I made an example where everything was in a single class, but most > >> scenarios involve a lazy-loadi

Re: [PHP-DEV] Explicit constructor call and polymorphic dispatch

2017-01-12 Thread Marco Pivetta
Hey Richard, On Thu, Jan 12, 2017 at 9:58 PM, Fleshgrinder wrote: > On 1/12/2017 9:35 PM, Marco Pivetta wrote: > > Heya, > > > > While I agree that it is weird to be able to call constructors more than > > once, this is generally used for: > > > >

Re: [PHP-DEV] Explicit constructor call and polymorphic dispatch

2017-01-12 Thread Marco Pivetta
ass (and I generally advise against doing that anyway). Therefore I don't see a reason to drop manual constructor calls, unless there is a strong necessity to get rid of 'em. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Thu, Jan 12, 2017 at 8:11 AM, Tim Bez

Re: [PHP-DEV] [RFC][VOTE] array_change_keys

2017-01-08 Thread Marco Pivetta
rging duplicate keys should be part of the function name, or a parameter (the former being better, having a strict version that fails, and a merging version that overwrites) * I totally forgot that I benchmarked this before :-\ https://github.com/Ocramius/array_change_keys-benchmark Marco Pivetta

Re: [PHP-DEV][RFC][VOTE] Throwable error code's type generalization

2017-01-06 Thread Marco Pivetta
On 6 Jan 2017 18:27, "Wes" wrote: Hi Marco \o, linking to the discussion thread http://externals.io/thread/573 because I don't have much more to add. I think the throwable's code is almost never used regardless, but this could give users more opportunities to do something useful with it as Nikl

Re: [PHP-DEV][RFC][VOTE] Throwable error code's type generalization

2017-01-06 Thread Marco Pivetta
at just defines an accessor for that new context information. Greets, Marco Pivetta

Re: [PHP-DEV] Re: [RFC] ServerRequest and ServerResponse objects

2017-01-06 Thread Marco Pivetta
dn't use nor try this extension so far. IMO needs another few design iterations, and a lot more adoption, in order to become interesting. Or you provide us with a factory for an implementation of these concepts that already has adoption, traction and extremely careful design behind it. Greets, Marco Pivetta

Re: [doctrine-user] Filtering of subclasses

2017-01-05 Thread Marco Pivetta
sions in https://github.com/doctrine/doctrine2/issues/2237 Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Thu, Jan 5, 2017 at 11:41 AM, Lukas Hofer wrote: > Hi! I have the following structure of entities: Customer is the parent > class and it has two subclasses -

Re: [doctrine-user] Doctrine GROUP BY ANY_VALUE

2016-12-30 Thread Marco Pivetta
ct('ANY_VALUE(d.id), d.nom, count(d.nom) as lignes'); > $qb->groupBy('d.nom'); > $qb->orderBy('d.nom'); > > But doctrine don't recognize this function > > [2/2] QueryException: [Syntax Error] line 0, col 7: Error: Expected known > function, g

Re: [PHP-DEV] Decorator classes

2016-12-29 Thread Marco Pivetta
omething that opcache could do anyway. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [PHP-DEV] Decorator classes

2016-12-29 Thread Marco Pivetta
t my 2 cents: Too much magic syntactic sugar, whereas you are just saving very little time while implementing a few method stubs that take.. Yet, in order to achieve that, you added a huge amount of complexity for all the tooling that relies on the AST, including PHP itself. . Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [VOTE] First Core Committee Elections

2016-12-18 Thread Marco Pivetta
1. Stefano Torresi 2. Lukas Kahwe Smith 3. Gary Hockin 4. David Négrier 5. Samantha Quiñones -- 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

Re: [PHP-DEV][RFC][DISCUSSION] - Throwables error code's type generalization

2016-12-18 Thread Marco Pivetta
m doesn't enforce it doesn't mean that we should blindly allow everything everywhere, as that removes any sort of guarantees on contracts, making it impossible to reason about what the code will do. But if you think it'll be necessary I'll require 2/3 of the votes. >

Re: [PHP-DEV][RFC][DISCUSSION] - Throwables error code's type generalization

2016-12-18 Thread Marco Pivetta
Fix one library or fix all of them: good luck with the second one. 😉 Anyway, the type change (on the property, in this case) can be applied to any interface change reducing return type strictness: it is a BC break. On 18 Dec 2016 11:47 a.m., "Wes" wrote: > Yo, Marco :P I don't need to add any c

Re: [PHP-DEV][RFC][DISCUSSION] - Throwables error code's type generalization

2016-12-18 Thread Marco Pivetta
Looks like a step backwards to me. In fact, I just had issues with code (in zendframework https://github.com/zendframework/zend-servicemanager/pull/167) that assumed integer error codes, but then failed because PDO failed to adhere to the property specification (PDO needs fixing here, not the other

Re: [PHP-DEV] PHP 5.6 end of active support

2016-12-14 Thread Marco Pivetta
See https://secure.php.net/supported-versions.php On 14 Dec 2016 9:29 p.m., "Dennis Clarke" wrote: > > >> >> PHP 5.6 isn't EOL for a further two years, you should be fine. >> >> > Thank you so much. I can only guess this is posted on a "lifetime" page > somewhere on php.net but I didn't see it.

Re: [doctrine-user] Sql é exibida na tela após uma consulta

2016-12-14 Thread Marco Pivetta
Hi Carlos, Can you please show what you've attempted so far? Also, please try to keep messages in English, as that's the language for this mailing list. Greets, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ 2016-12-14 19:22 GMT+01:00 Werliton Carlos :

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-05 Thread Marco Pivetta
On Mon, Dec 5, 2016 at 4:31 AM, Yasuo Ohgaki wrote: > Hi Marco, > > Thank you for explaining the reason why! > > On Mon, Dec 5, 2016 at 11:12 AM, Marco Pivetta wrote: > > I voted "no" because I don't see any advantage over using a custom > session > &g

Re: [PHP-DEV] [RFC][VOTE] User defined session serializer

2016-12-04 Thread Marco Pivetta
on save handler decorator instead. Greets, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Mon, Dec 5, 2016 at 2:44 AM, Yasuo Ohgaki wrote: > Hi all, > > This RFC exposes session serializer interface to user space. It works > like user defined session save han

Re: [doctrine-user] adding doctrine/common 2.7 in composer

2016-12-01 Thread Marco Pivetta
We need to release an ORM version supporting common 2.7. for now, you can use composer's `AS` dependency require workaround. -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send

Re: [PHP-DEV] [RFC][DISCUSSION] Object type hint, now with added variance

2016-11-22 Thread Marco Pivetta
This looks awesome to me: nicely cleaned up! 👍 On 23 Nov 2016 01:52, "Dan Ackroyd" wrote: > Hi, > > This is the reintroduction of the Object Type RFC for discussion. > > There was previously strong feedback from people who would prefer that > the inheritance checks for methods that use object ty

Re: [PHP-DEV] [RFC] Deprecations for PHP 7.2

2016-11-19 Thread Marco Pivetta
of the current open-source libs out there are trying to push for SemVer - having PHP not following that seems like a huge mess to me. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [PHP-DEV] Ask php cli to parse HTTP request

2016-11-16 Thread Marco Pivetta
One question then: why? Working userland impl, just use it. On 16 Nov 2016 16:01, "Aaron Lewis" wrote: > Thanks Marco. > > But I'm looking for the C implementation .. > > On Wed, Nov 16, 2016 at 8:43 PM, Marco Pivetta wrote: > > Maybe something like ht

Re: [PHP-DEV] Ask php cli to parse HTTP request

2016-11-16 Thread Marco Pivetta
Maybe something like https://github.com/guzzle/psr7/blob/master/README.md? There are additional middlewares that can extract from a request and populate super-globals for legacy app support purposes. On 16 Nov 2016 11:50, "Aaron Lewis" wrote: > I have a file that contains a HTTP request, > > ```

Re: [doctrine-user] Composite and foreign keys issue

2016-10-27 Thread Marco Pivetta
11:52, "Maksim Borisov" wrote: > Thank you, Marco. > > Can you help newbie to send feature request to doctrine-team for that > case? How can I do it? > > четверг, 27 октября 2016 г., 7:14:17 UTC+7 пользователь Marco Pivetta > написал: >> >> That's an ORM li

Re: [doctrine-user] Composite and foreign keys issue

2016-10-26 Thread Marco Pivetta
That's an ORM limitation that you are hitting. The ORM doesn't really know (yet? nobody working on this, so far) how to deal with multiple levels of identity indirection, at the moment. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Thu, Sep 29, 2016

Re: [PHP-DEV] [RFC][DISCUSSION] Object type hint

2016-10-24 Thread Marco Pivetta
rics, but that's not viable for now. This additional type hint is pretty much covering the scenarios above in a very approachable way. Greets, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Sun, Oct 23, 2016 at 12:39 AM, Michał Brzuchalski wrote: > Hi all, &

Re: [PHP-DEV] [RFC] Bug #72811 - Replacing parse_url()

2016-10-06 Thread Marco Pivetta
; -- > Dave > Like with any software rewrite project, remember that software rewrites usually fail. It's probably better to deprecate the function, make a new one, then code the newer implementation there, and let users migrate. This is necessary to mitigate the risk of BC breaks. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [PHP-DEV] Re: [RFC][DISCUSSION] Improve uniqid() uniqueness

2016-10-02 Thread Marco Pivetta
is patch from PHP 7.0 branch, then discuss what > the default should be. > > Any comments? > If there is no objections, I'll apply this few days later. > If you need comments on a patch, send a PR? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [PHP-DEV] Fix ReflectionType::__toString() BC break

2016-09-30 Thread Marco Pivetta
esolved from my perspective, and some sort of soft-deprecation was introduced (deprecated, but no deprecation notice triggered). Nicolas, can you confirm if this works on your side? Greets, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [doctrine-user] Bug in AssignedGenerator.php

2016-09-29 Thread Marco Pivetta
/Functional/Ticket/DDC992Test.php, for example (just adapted to your scenario). Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Thu, Sep 29, 2016 at 4:42 PM, Janelle Tavares wrote: > I believe that I found a bug in the latest version of > AssignedGenerat

Re: [doctrine-user] Re: How to force column's default value? MSSQL, Symfony Entity

2016-09-28 Thread Marco Pivetta
On Wed, Sep 28, 2016 at 9:22 AM, 'Dominik Echterbruch' via doctrine-user < doctrine-user@googlegroups.com> wrote: > Thanks Marco. > > On Tuesday, September 27, 2016 at 11:57:13 PM UTC+2, Marco Pivetta wrote: >> >> Doctrine does not (and will not) support DE

Re: [doctrine-user] Re: How to force column's default value? MSSQL, Symfony Entity

2016-09-27 Thread Marco Pivetta
entity's constructor Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Tue, Sep 27, 2016 at 5:16 PM, 'Dominik Echterbruch' via doctrine-user < doctrine-user@googlegroups.com> wrote: > Hello. > > I wonder if there is a possibility to rem

Re: [PHP-DEV] Server-Side Request/Response Objects

2016-09-26 Thread Marco Pivetta
Hey Paul, On 26 Sep 2016 21:38, "Paul Jones" wrote: > > Hi all, > > tl;dr: Gauging interest in an extension for server-side PHP request and response objects (*not* HTTP messages per se; see below) prior to writing an RFC for them on the wiki. > > * * * > > From time to time we've all heard the co

Re: [PHP-DEV] [RFC] Namespace-scoped declares

2016-09-23 Thread Marco Pivetta
, let alone the precise semantic behaviour'. And I'd also add: some libraries are doing amazing AOP things with this. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [PHP-DEV] Fix ReflectionType::__toString() BC break

2016-09-21 Thread Marco Pivetta
a string with more meaning seems like the correct way to go forward on this, making it die with 8.0. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [PHP-DEV] Fix ReflectionType::__toString() BC break

2016-09-21 Thread Marco Pivetta
It's a point release, it's not really "up for decision" whether BC can be broken or not on functionality that is working as intended (unless I misunderstand the release process). Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Wed, Sep 21, 2

Re: [PHP-DEV] Fix ReflectionType::__toString() BC break

2016-09-21 Thread Marco Pivetta
That still means that code designed for 7.0 will break while reflecting 7.0 code (`= null` scenario) when run on 7.1, effectively preventing upgrade, Niklas. On 21 Sep 2016 15:27, "Niklas Keller" wrote: > 2016-09-21 15:14 GMT+02:00 Nikita Popov : > > > On Wed, Sep 21, 2016 at 10:55 AM, Nicolas G

Re: [doctrine-user] Is it a good practice to keep/maintain Doctrine and non-Doctrine ways of setting foreign keys?

2016-09-20 Thread Marco Pivetta
You shouldn't have two ways of mapping an association inside a single entity. Either use objects, or use identifiers (and don't use lazy-loading then). Also, you can always get a reference, if you know that the foreign key is valid, via $product = $em->getReference(Product::clas

Re: [doctrine-user] Free software ORM Designer program alternative to Skipper

2016-09-20 Thread Marco Pivetta
There's a metadata grapher in DocrtineORMmodule, but it's not really a GUI. On 20 Sep 2016 16:52, "João Dalben" wrote: > Hello, I was wondering if there is a free software alternative to Skipper ( > https://www.skipper18.com/) to generate Doctrine 2 annotations? Even if > it paid, I'm concerned

Re: [PHP-DEV] [RFC][DISCUSSION] Improve uniqid() uniqueness

2016-09-12 Thread Marco Pivetta
ubscribe, visit: http://www.php.net/unsub.php > > Full ACK on what Kazuo said. I use `uniqid()` daily in my test suites, even new ones (not much else), and introducing the `.` everywhere will just cause issues. Changing string length may also break everything. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [PHP-DEV] RFC - Immutable classes

2016-09-10 Thread Marco Pivetta
mutable hidden state! */ } } Requiring immutable values in consumers will likely improve code quality/safety and reduce dangerous assumptions, and it will probably also allow for optimizations in the engine later on. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [doctrine-user] Getting error

2016-09-07 Thread Marco Pivetta
Seems like an autoloading issue. Not related to doctrine, but to https://github.com/zendframework/ZendDeveloperTools Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Wed, Sep 7, 2016 at 4:13 PM, Nikhil Dhar wrote: > Hey I am new in this please find the be

Re: [doctrine-user] Collection is literally 'true' after unserialize

2016-09-07 Thread Marco Pivetta
What's `get_class($token)` (before serialization)? What does that class look like? What do the ancestors of it look like? Is the data serialized and unserialized in the same system? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Wed, Sep 7, 2016 at 5:16 PM, T

Re: [PHP-DEV] Suggestion

2016-09-01 Thread Marco Pivetta
of the line.) > > -- > Bob Williams > Yeah, and I would question: 1. why are you editing with a plaintext editor and searching stuff like that? Are you in a super-hurry? Seems like a 0.001% scenario 2. why do you need to search for functions in a class? Just what kind of monstrou

Re: [PHP-DEV] Re: [RFC][VOTE] E_WARNING on invalid container read-adccess

2016-08-31 Thread Marco Pivetta
Ah, thanks, I thought it was silently passing :-) On 31 Aug 2016 12:10 p.m., "Dmitry Stogov" wrote: > no. if you would try the proposed PR with this code, you would see: > > > Fatal error: Uncaught Error: Unsupported operand types > > ------

Re: [PHP-DEV] Re: [RFC][VOTE] E_WARNING on invalid container read-adccess

2016-08-31 Thread Marco Pivetta
Hi Dmitry, On 31 Aug 2016 8:37 a.m., "Dmitry Stogov" wrote: > > I vote NO, because the implementation introduces more problems than intents to fix. > > For example the following code starts to throw exception: > > > Isn't that the point of this RFC? I would expect this code to only ever work by

Re: [PHP-DEV] Re: feature-request : html + css logging in apache logs (example for the rest of the unix community too)

2016-08-27 Thread Marco Pivetta
Are you looking for https://filp.github.io/whoops/ ? On 28 Aug 2016 5:29 a.m., "Rene Veerman" wrote: > eh oops, this would've maybe been easier, and allows me to update these > sources in the future if and when needed.. > > https://github.com/seductiveapps/webappObfuscator/blob/master/ > webappO

Re: [PHP-DEV] ReflectionType::__toString() prepending \ to class names

2016-08-21 Thread Marco Pivetta
ath, exactly like we'll have to do with the OSS libs. That said, I'm muting the thread: I'm basically wasting time with this, apparently. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Sun, Aug 21, 2016 at 9:48 PM, Levi Morrison wrote: > The issue h

Re: [PHP-DEV] ReflectionType::__toString() prepending \ to class names

2016-08-21 Thread Marco Pivetta
Hi Dan, On Sun, Aug 21, 2016 at 8:55 PM, Dan Ackroyd wrote: > On 21 August 2016 at 17:01, Marco Pivetta wrote: > > Yes, but the __toString API is used for codegen, and current code > > generators don't expect a `?` to appear there. > > And they will continue to not

Re: [PHP-DEV] ReflectionType::__toString() prepending \ to class names

2016-08-21 Thread Marco Pivetta
Yes, but the __toString API is used for codegen, and current code generators don't expect a `?` to appear there. How many engineers and failing unit tests does it take to explain a BC break? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Sun, Aug 21, 2016 at 6:

Re: [PHP-DEV] ReflectionType::__toString() prepending \ to class names

2016-08-21 Thread Marco Pivetta
On Sun, Aug 21, 2016 at 5:46 PM, Levi Morrison wrote: > > > On Sun, Aug 21, 2016 at 9:42 AM, Marco Pivetta wrote: > >> Including the question mark still breaks code-gen based on simple >> nullable types. PHP 7.0.x-compliant code will do following: >> >> -

Re: [PHP-DEV] ReflectionType::__toString() prepending \ to class names

2016-08-21 Thread Marco Pivetta
f the many libraries involved. The new API already includes `ReflectionType#allowsNull()`, so that's sufficient to build forward-compliant codegen. Breaking BC is a no-go though. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Sun, Aug 21, 2016 at 5:39 PM, Lev

Re: [PHP-DEV] ReflectionType::__toString() prepending \ to class names

2016-08-19 Thread Marco Pivetta
as simple, BC break and clear lack of > consensus the change is still not reverted? I explicitly asked Aaron to wait for me to check out things today. Indeed, it is a mess, but it would probably already have been reverted if we managed to verify the issues earlier on. :-) Marco Pivetta

Re: [PHP-DEV] ReflectionType::__toString() prepending \ to class names

2016-08-19 Thread Marco Pivetta
page where we can see the current state of the `ReflectionType` API (and its subtypes) would be golden. * `ReflectionType#__toString()` seems to crash in very interesting ways when `?string` is reflected (see issue above - couldn't isolate precisely) Cheers, Marco Pivetta http://twitt

Re: [PHP-DEV] ReflectionType::__toString() prepending \ to class names

2016-08-19 Thread Marco Pivetta
Foo", "bar"))->getReturnType());' object(ReflectionNamedType)#2 (0) { } Was there a newer RFC that I missed? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Wed, Aug 17, 2016 at 7:25 PM, Marco Pivetta wrote: > On Wed, Aug 17, 2016 at 7:17 PM, Aaron Piot

Re: [PHP-DEV] PHP 7.1.0beta3 is available for testing

2016-08-19 Thread Marco Pivetta
everting. We were hoping to look into it today, but it seems like beta3 hit us before we got there :-D Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Fri, Aug 19, 2016 at 9:06 AM, Davey Shafik wrote: > Hi, > > PHP 7.1.0beta3 was just released and can be dow

Re: [PHP-DEV] ReflectionType::__toString() prepending \ to class names

2016-08-17 Thread Marco Pivetta
On Wed, Aug 17, 2016 at 7:17 PM, Aaron Piotrowski wrote: > > > On Aug 17, 2016, at 12:02 PM, Marco Pivetta wrote: > > > > That would have been a headache anyway. We saw it coming, and it will be > fixed on our end, but please don't try to outsmart it. > > I k

Re: [PHP-DEV] ReflectionType::__toString() prepending \ to class names

2016-08-17 Thread Marco Pivetta
On Wed, Aug 17, 2016 at 6:55 PM, Aaron Piotrowski wrote: > > > On Aug 17, 2016, at 11:45 AM, Marco Pivetta wrote: > > > > Since scalar types are invalid anyway if prepended with `\`, I see no > point > > in producing a string with the `\` in it. > > > >

Re: [PHP-DEV] ReflectionType::__toString() prepending \ to class names

2016-08-17 Thread Marco Pivetta
). This is not being really helpful, as it is. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Wed, Aug 17, 2016 at 6:44 PM, Aaron Piotrowski wrote: > Marco, > > > On Aug 17, 2016, at 11:22 AM, Marco Pivetta ocram...@gmail.com>> wrote: > > >

Re: [PHP-DEV] ReflectionType::__toString() prepending \ to class names

2016-08-17 Thread Marco Pivetta
always dealing with the base namespace. Seems unnecessary and causes a lot of headaches, instead of actually simplifying things. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Wed, Aug 17, 2016 at 6:18 PM, Aaron Piotrowski wrote: > Hi all, > > I recently made som

Re: [doctrine-user] Explicit undex names in many-to-many associations

2016-08-16 Thread Marco Pivetta
Not for join tables, sorry. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Tue, Aug 16, 2016 at 12:44 PM, Łukasz Strzyżowski wrote: > I have an association like below: > > /** > * @var Worker > * > * @ORM\ManyToMany(targetEntity

Re: [doctrine-user] Doctrine ProxyGenerator issues a PHP warning when trying rename()

2016-08-16 Thread Marco Pivetta
You probably created proxies with one user, then tried to overwrite them with a different user. In general, at least for prod environments, you should ship with pre-generated proxy classes. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Mon, Aug 15, 2016 at 7:50 PM

Re: [PHP-DEV] [RFC] get_class() disallow null parameter

2016-08-15 Thread Marco Pivetta
Works for me 👍 On 15 Aug 2016 10:17 p.m., "Dan Ackroyd" wrote: > On 14 August 2016 at 19:01, Marco Pivetta wrote: > > Hi Dan, > > > > This is a SemVer violation, but it doesn't seem like PHP follows SemVer > > closely, so I'm a bit confused about

Re: [PHP-DEV] Re: [RFC][VOTE] Add validation functions to filter module

2016-08-14 Thread Marco Pivetta
Hey Yasuo, Besides what reported above by Dan, my reasoning for voting "no" is that this API can be implemented in userland, regardless if trivial or not There is no reason good enough for justifying yet another added endpoint that can even be implemented with simple function composition. In add

Re: [PHP-DEV] Namespaces internal refactoring

2016-08-14 Thread Marco Pivetta
Hey Stas On 15 Aug 2016 00:35, "Stanislav Malyshev" wrote: > > Hi! > > > A realization that needs to be made is that beginners would be using > > libraries that requires to make valid restrictions, preventing those > > beginners to mess up with code they shouldn't. So even if the use case > > is

Re: [PHP-DEV] Simple variable handling.

2016-08-14 Thread Marco Pivetta
Hey Tony, On Sun, Aug 14, 2016 at 10:50 AM, Tony Marston wrote: > "Marco Pivetta" wrote in message news:CADyq6sKZRBvYFtqyKYVYM4iU > ex+2ouujvhep1jznm56k3+h...@mail.gmail.com... > >> >> So much confusion... >> >> There are 3 (or more) types of

Re: [PHP-DEV] [RFC] get_class() disallow null parameter

2016-08-14 Thread Marco Pivetta
een passed to `get_class()` was a bug, in my work context, so I'm really happy to see this patch going in. Still, can any of the release managers throw their opinion at the RFC? This is a SemVer violation, but it doesn't seem like PHP follows SemVer closely, so I'm a bit confus

Re: [PHP-DEV] Simple variable handling.

2016-08-13 Thread Marco Pivetta
r data-integrity and correctness of a value at every layer of your architecture. Add `__toString` to them and they even behave like they did before (strings). On 13 Aug 2016 19:02, "Lester Caine" wrote: On 13/08/16 14:43, Marco Pivetta wrote: > It receives a value (nested, if necessar

Re: [PHP-DEV] Simple variable handling.

2016-08-13 Thread Marco Pivetta
So much confusion... There are 3 (or more) types of validation in pretty much every web-app, so let's please stop calling it simply "validation". 1. frontend validation (unsafe/unreliable), prevents invalid data submission, makes things friendlier for the user 2. form validation, in the applicati

Re: [PHP-DEV] [RFC][VOTE] Add session_gc() function

2016-08-10 Thread Marco Pivetta
Hey Yasuo, Something is weird with the voting form, can you check it? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Wed, Aug 10, 2016 at 11:30 AM, Yasuo Ohgaki wrote: > Hi all, > > This RFC is to add session_gc() function. > > session_gc() function

Re: [PHP-DEV] [RFC][VOTE] Add session_create_id() function

2016-08-10 Thread Marco Pivetta
ning for voting "no". Cheers, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Wed, Aug 10, 2016 at 11:14 AM, Yasuo Ohgaki wrote: > Hi all, > > This is RFC for adding session_create_id() function. > > Session ID string uses special binary to

Re: [doctrine-user] PEAR support removed? Issue with pear.doctrine-project.org?

2016-08-03 Thread Marco Pivetta
influential projects, such as PHPUnit, for example, already shut down their PEAR repository ages ago. Heck, this is from 2014: http://marc.info/?l=php-internals&m=140056783816305&w=2 Cheers, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Wed, Aug 3, 2016 at 4:

Re: [doctrine-user] PEAR support removed? Issue with pear.doctrine-project.org?

2016-08-03 Thread Marco Pivetta
We don't support PEAR anymore Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Wed, Aug 3, 2016 at 4:11 PM, barryo wrote: > Hi folks, > > is PEAR still supported for ORM 2.3? > > Looks like the domain is not resolving: > > $ dig +short ns d

Re: [doctrine-user] MySQL cache

2016-08-01 Thread Marco Pivetta
Usually, RDBMs are a poor fit as k/v cache. On 2 Aug 2016 7:58 a.m., "Nima Sadjadi" wrote: > Hi, > > What about this? Would consider to add? > > https://github.com/doctrine/cache/issues/175 > > Thanks, > > -- > You received this message because you are subscribed to the Google Groups > "doctrine

Re: [PHP-DEV] [RFC] New operator for context-dependent escaping

2016-07-30 Thread Marco Pivetta
ns for that. The proposed solution is a solution, but not for this problem, in my opinion. Greets, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [PHP-DEV] [RFC] New operator for context-dependent escaping

2016-07-20 Thread Marco Pivetta
not a global registry. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Wed, Jul 20, 2016 at 8:17 PM, Michael Vostrikov < michael.vostri...@gmail.com> wrote: > > Personally I don't know any developer who is using raw php in project > without templ

Re: [doctrine-user] Broken links in ORM 2 documentation

2016-07-20 Thread Marco Pivetta
Jira was completely removed from the website, as we moved all issues to github. Consider editing https://github.com/doctrine/doctrine2/blob/master/docs/en/index.rst and sending us a patch (can do directly from the interface) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com

Re: [doctrine-user] There is no column with name 'brand' on table 'customer', What??!!!

2016-07-12 Thread Marco Pivetta
;t do transactional DDL, so you might be in some sort of limbo (neither pre- nor post- migration status) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 12 July 2016 at 10:27, wrote: > Yeah, soory I forget to iclude the schema: > > CREATE TABLE `customer` ( &g

Re: [doctrine-user] There is no column with name 'brand' on table 'customer', What??!!!

2016-07-12 Thread Marco Pivetta
Not sure what is being asked: we don't know what your schema looks like before generating the migration... Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 12 July 2016 at 10:21, wrote: > I'm getting this error when executing doctrine:migrations:diff &g

Re: [doctrine-user] Tutorial clarification - ArrayCollection

2016-07-11 Thread Marco Pivetta
I linked the source file: https://github.com/doctrine/doctrine2/blob/master/docs/en/tutorials/getting-started.rst The docs are part of the doctrine2 sources. They get converted into website-version every once in a while. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On

Re: [doctrine-user] Tutorial code differences vs. github

2016-07-11 Thread Marco Pivetta
rine2/blob/44feacd32764207e2394d9f42e1de57f3571b79d/lib/Doctrine/ORM/Tools/Console/ConsoleRunner.php#L41 Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 12 July 2016 at 07:27, Doctrinator wrote: > > https://doctrine-orm.readthedocs.io/en/latest/tutorials/getting-started.html#generating-the-database-sc

Re: [doctrine-user] Tutorial code differences vs. github

2016-07-11 Thread Marco Pivetta
Could you link the examples where you grabbed this from? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 12 July 2016 at 07:00, Doctrinator wrote: > Hi Marco and others, > > There are differences between the tutorial's code and what's in GitHub.

Re: [doctrine-user] Tutorial clarification - ArrayCollection

2016-07-11 Thread Marco Pivetta
That seems good to me :-) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 12 July 2016 at 06:40, Doctrinator wrote: > Thanks Marco! That makes a lot of sense. > > I'll be happy to do a PR, but perhaps getting the wording right here will > be easie

Re: [doctrine-user] Tutorial clarification - ArrayCollection

2016-07-11 Thread Marco Pivetta
ly. Hope that clarifies it. Please remember to edit the text on the documentation, if this was helpful and you now understand what is going on :-) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 12 July 2016 at 02:20, Greg Bell wrote: > Hi All, > > Looki

<    1   2   3   4   5   6   7   8   9   10   >