as tt;
}
public function t(): string {
return 't';
}
}
This proposal gives you tools to ensure that class does not mess up with method signatures expected by trait - you can create pairs of trait-interface
and require interface in trait.
--
Regards,
Robert Korulc
s to define its
purpose and ensure that classes have proper definition.
--
Regards,
Robert Korulczyk
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
oken "implements" detection. At the same time navigation between
classes and interfaces worked without any problem.
--
Regards,
Robert Korulczyk
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php
ent and not implement the interface, because it depends on class
where it is used). And finally, you could use `{@inheritdoc}` in some meaningful way in traits - right now there is no straightforward way to inherit
phpdoc from the interface, and often this is what you want to do.
--
Regards,
R
turns array generated from string. It would be great to handle this
too, even if it will be only syntactic sugar, where
`$object->property['key'] = 'value';` will be equivalent of this dance:
$temp = $object->property;
$temp['key'] = 'value';
$object-&
t. But you don't need to know previous
value (or its type) to overwrite it (it does not matter what is
$foo[$key1] value if you do `$foo[$key1] = 1` - it works similar to `$foo = 1`);
Regards,
Robert Korulczyk
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
unnecessary errors.
Well, then let's say that it is "lesser evil" - one additional line is better
than ignoring reading uninitialized values. And IMO it is not a
"problem" that would justify introducing special syntax for saving one line in
such niche case.
Regards,
Rob
mbs - unmaintained extensions with possible
security issues. Right now the biggest problem of WordPress ecosystem is
quality of community extensions and themes. Cutting of all old and unmaintained
extensions may be not that bad...
Regards,
Robert Korulczyk
--
PHP Internals - PHP Runtime Developme
W dniu 12.09.2019 o 22:45, Rowan Tommins pisze:
> On 12/09/2019 15:43, Robert Korulczyk wrote:
>> One additional line will make your code much more obvious and easier to read
>> and understand:
>>
>> $i ??= 0;
>> $i++;
>
>
> I don't find this co
entions clearly is important - the less ambiguity the better.
Regards,
Robert Korulczyk
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
> Good for you! Come take a stab at my legacy project. It's horrendous. We have
> some files where using PhpStorm's automatic formatting actually caused
> stuff to break. So, you can see why I might be a little reticent to depend on
> an automated tool to change my php tags. I'll let you start wi
> While possibly a bit hyperbolic, most of the arguments basically come off
> that way to me as well. I've definitely viewed most of what you've said in
> that manner.
I guess we're in some kind of limbo where half of the people do not consider
problems which short open tags create as serious, a
> This discussion has gone out of sanity levels the moment people started to
> state that short tags is one (of the many)
> things PHP has why new programmers and companies don't pick the language or
> why colleagues laugh at you and is a
> blocker of new bright future etc. and now in this mome
nt 2, there is no IDE or editor which will generate code like
`exec($_GET['param'])`, while there is at least one popular IDE which
will generate code with short open tags.
Regards,
Robert Korulczyk
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
> Sure those are important - I was just pointing out that the "security card"
> is questionable since the language has more dangerous features
> which ask for the user to be careful and responsible about them rather than
> making everything foolproof and accident-free.
Honestly, I don't see how
ons/features are allowed by default while every other guide on
hardening web suggests those to be disabled (added to disable_functions)?
These methods have their purpose (pretty important BTW), short open tags is
just "don't use it!!!" feature.
Regards,
Robert Korulczyk
--
PHP Intern
W dniu 14.08.2019 o 11:09, Christian Schneider pisze:
> Am 14.08.2019 um 10:39 schrieb Peter Kokot :
>>> The best counterargument I can give against "cleaning up" is that it takes
>>> energy away from actual new features, even if it's just the mental energy
>>> of monitoring and responding to lon
you will not have cases when
code works fine on one environment and leak on another.
Regards,
Robert Korulczyk
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
cations, who don't want to spend
money on upgrading them. If BC breaks are really such a big problem
for thousands of companies, there should be no problem to find founders to pay
~1 developer for maintaining LTS line and backporting security fixes.
Regards,
Robert Korulczyk
--
PHP Inte
> I did mention such example with the 'engine' setting (
> https://www.php.net/manual/en/apache.configuration.php#ini.engine as it's
> PHP_INI_ALL ). Of course you could ask why would anyone do that (and afaik
> it's sapi specific) but technically it can happen just in one "hard to
> notice" su
ith all
new features and BC breaks.
Regards,
Robert Korulczyk
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
anguage behaviour?
Can you give an example where using `.user.ini` may create unexpected and hard
to notice code leaks?
Regards,
Robert Korulczyk
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
rself in the foot - it exists, but no one should use it.
And it is still really easy to use it by accident. For example, this is what
PhpStorm generates when you try to inline-comment tag with short echo:
Regards,
Robert Korulczyk
--
PHP Internals - PHP Runtime Development Mailing List
To un
> Many people have talked about the potential impacts of keeping short tags.
> I have yet to see anyone give an actual example where they have been
> negatively impacted by their existence. I've given you my personal story of
> how removing them will negatively impact my company. I welcome anyone t
t unexpectedly pop out without any warning and
explanation (exception "It's PHP, deal with it").
Regards,
Robert Korulczyk
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
m surprised by the controversy around this change. So far it was
an obvious anti-pattern for me, and never seen anybody who was aware of
the consequences of using On 4/11/2019 1:12 AM, Robert Korulczyk wrote:
>>> Sorry for the sarcasm, please don't consider this as a personal atta
> Sorry for the sarcasm, please don't consider this as a personal attack. The
> whole community (not just you) considers short open tags poison because not
> XML-compatible...
This is rather removing another trap from the language. As long as short open
tags exist and depend on INI directive, th
e anyway, but this
is just example when mixed type-hint may work as actual type-hint, not
just replacement for PHPDoc or equivalent of... nothing.
Regards,
Robert Korulczyk
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Sounds like an arbitrary interpretation. Treating `?mixed" as "top type"
(including null) would be more practical and consistent with other type-hints.
Regards,
Robert Korulczyk
W dniu 08.02.2019 o 12:47, Marco Pivetta pisze:
> `mixed` is the "top" type, which means
What definition?
Regards,
Robert Korulczyk
W dniu 08.02.2019 o 12:37, Marco Pivetta pisze:
> Mixed includes null by definition.
>
> On Fri, 8 Feb 2019, 12:21 Robert Korulczyk <mailto:rob...@korulczyk.pl> wrote:
>
> > Without this, the mixed type-hint is basically
mixed is not very pragmatic -
mixed could be used to disallow null, so it will actually work for type
check.
Regards,
Robert Korulczyk
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
> I can't really think of another name ... it's ... a weakref ...
It is actually "weak reference", so why not WeakReference?
Regards,
Robert Korulczyk
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
ect by typehints or type checks (which you
would probably do anyway). And you still can create an uninitialized object for
lazy initialization or whatever you want.
--
Regards,
Robert Korulczyk
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
33 matches
Mail list logo