Hi all,
On Wed, Aug 3, 2016 at 3:43 PM, Yasuo Ohgaki wrote:
>
> This RFC is to add validation functions and string validation filter.
>
> https://wiki.php.net/rfc/add_validate_functions_to_filter
>
> It also allows to define multiple filters for an input. i.e. You can
> apply multiple filter rule
Hi all,
Pierre suggested the functions should be named "filter_*" and I agree.
On Fri, Aug 5, 2016 at 6:25 AM, Yasuo Ohgaki wrote:
> Input validation is like assertion shouldn't fail.
How about
filter_assert_var() <- validate_var()
filter_assert_var_array() <- validate_var_arr
Hello everyone,
PHP 5.6.25 RC1 was just released and can be downloaded from:
http://downloads.php.net/~tyrael/
The Windows binaries are available at http://windows.php.net/qa/
This release contains a number of bugfixes.
For the list of bugfixes that you can target in your
testing, please refer
Hi!
having a complete trace from an exception would be great:
function shutdown() {
$e = new Exception();
echo $e->getTraceAsString();
}
function test() {
exit;
}
register_shutdown_function('shutdown');
test();
gives:
#0 [internal function]: shutdown()
#1 {main}
Regards
Thomas
Bishop B
I should have been more precise.
On Fri, Aug 5, 2016 at 8:58 AM, Yasuo Ohgaki wrote:
>
> Input validation is like assertion that should never happen.
> It should be validated(asserted) according to the software input spec and
> it should be checked as soon as inputs arrive to the software, and le
On Fri, Aug 5, 2016 at 7:03 AM, Lester Caine wrote:
> On 04/08/16 22:47, Yasuo Ohgaki wrote:
>>> The correct response to a form validation error is to show a message to the
>>> > user with as much detail as possible, not to simply terminate the script
>>> > and
>>> > assume they are trying to att
On Thu, Aug 4, 2016 at 11:10 AM, Bishop Bettini wrote:
> I'm wondering if the shutdown functions could access telemetry:
>
> register_shutdown_function(function () {
>
> $context = shutdown_get_context();
>
> /** array ( 'exit' => array ('file' => '/path/to/Foo.php', 'line' =>
> 242, 'mes
On 04/08/16 22:47, Yasuo Ohgaki wrote:
>> The correct response to a form validation error is to show a message to the
>> > user with as much detail as possible, not to simply terminate the script
>> > and
>> > assume they are trying to attack your application.
> We are talking about different thin
Hi Rowan,
On Fri, Aug 5, 2016 at 6:47 AM, Yasuo Ohgaki wrote:
>> I know naming things is hard, but I really do think "validation" is not the
>> correct name for what you are talking about. Search online for "form
>> validation", and you will see what I mean.
>>
>> The correct response to a form v
Hi Rowan,
On Fri, Aug 5, 2016 at 6:38 AM, Rowan Collins wrote:
> On 04/08/2016 22:25, Yasuo Ohgaki wrote:
>>
>> My preference is to raise exception to encourage users to handle
>> validation error correctly, i.e. terminate script execution, but my
>> intention may not be interpreted correctly wi
On 04/08/2016 22:25, Yasuo Ohgaki wrote:
My preference is to raise exception to encourage users to handle
validation error correctly, i.e. terminate script execution, but my
intention may not be interpreted correctly with or without exception.
I know naming things is hard, but I really do thin
Hi Rowan,
On Fri, Aug 5, 2016 at 6:04 AM, Rowan Collins wrote:
> On 04/08/2016 20:29, Yasuo Ohgaki wrote:
>>
>> One of my objective is following best practices.
>> Prefer exception over error is one of them. Although, I strongly suggest
>> to use exception for validation errors, I will have choic
Hi Bishop,
It would be good to preserve contexts to make debugging easier.
> I wonder if a method to convert an exit to an exception
> would be better:
That doesn't sound like a good plan. There are times when exiting
almost straight away is the correct thing to do. If we changed exit()
to not d
Hi Yasuo,
On 04/08/2016 20:29, Yasuo Ohgaki wrote:
One of my objective is following best practices.
Prefer exception over error is one of them. Although, I strongly suggest
to use exception for validation errors, I will have choices.
Best practice is to use exceptions to indicate an error *ins
Hi Christian,
On Thu, Aug 4, 2016 at 8:27 PM, Christian Stadler wrote:
> Am 04.08.2016 um 12:10 schrieb Yasuo Ohgaki:
>> Hi Christian and all,
>>
>> On Thu, Aug 4, 2016 at 10:07 AM, Christian Stadler wrote:
>>> Am 01.08.2016 um 10:23 schrieb Yasuo Ohgaki:
P.S. It's possible to return array
On Thu, Aug 4, 2016 at 12:11 PM Bishop Bettini wrote:
> Hi!
>
> exit (and its doppelganger die) is a hard stop to the engine and there is
> little telemetry provided about the circumstances (file, line, message, and
> code). In source I control, exit is no big deal: I don't use exit! But in
> lib
Hi!
exit (and its doppelganger die) is a hard stop to the engine and there is
little telemetry provided about the circumstances (file, line, message, and
code). In source I control, exit is no big deal: I don't use exit! But in
library code, exit can be frustrating.
register_shutdown_function + d
Hi,
PHP 7.0.10 RC1 was just released and can be downloaded from:
https://downloads.php.net/~ab/
The Windows binaries are available at
http://windows.php.net/qa/
This release contains a number of bugfixes.
For the list of bugfixes that you can target in your testing, please refer
to the
On 04/08/2016 11:45, Yasuo Ohgaki wrote:
Invalid inputs that violate input validation rules should not happen
almost always because input validation is _not_ the same input
mistakes by normal users. e.g. typo, user send a little too long
password. These mistakes should be handled as input errors/
Am 04.08.2016 um 12:10 schrieb Yasuo Ohgaki:
> Hi Christian and all,
>
> On Thu, Aug 4, 2016 at 10:07 AM, Christian Stadler wrote:
>> Am 01.08.2016 um 10:23 schrieb Yasuo Ohgaki:
>>> P.S. It's possible to return array that contains offending values. It
>>> is not included since users can store wh
Hi Lester,
On Tue, Aug 2, 2016 at 2:56 PM, Lester Caine wrote:
>
> Once again lots of additional code is being added which only fixes HALF
> of the input validation problem. The same as 'strict typing'.
I'm not trying to solve all of input validation issues by this
proposal. Large amount of resp
Hi Rowan,
On Tue, Aug 2, 2016 at 11:37 PM, Rowan Collins wrote:
> On 01/08/2016 23:12, Yasuo Ohgaki wrote:
>>
>> Raising Exception would be prefered.
>> Any comment raising exception? ExceptionFilterValidate wouldn't
>> cause much BC, IMO.
>
>
> I don't follow. Do you mean throwing an exception t
On 04/08/2016 11:10, Yasuo Ohgaki wrote:
I cannot return or modify referenced
parameter because of raised exception.
This is another reason why exceptions are not appropriate for this case.
As soon as you make an exception the expected result of something, you
end up tying yourself in knots t
Hi Christian and all,
On Thu, Aug 4, 2016 at 10:07 AM, Christian Stadler wrote:
> Am 01.08.2016 um 10:23 schrieb Yasuo Ohgaki:
>> P.S. It's possible to return array that contains offending values. It
>> is not included since users can store whole offending input array.
>> Whole input is more usef
Results for project PHP master, build date 2016-08-04 06:27:21+03:00
commit: 69a72df
previous commit:6a748c2
revision date: 2016-08-04 01:44:18+02:00
environment:Haswell-EP
cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores,
stepping 2, LLC 45 MB
Hi Pierre,
On Thu, Aug 4, 2016 at 1:23 PM, Pierre Joye wrote:
>
> Thanks for this proposal :)
>
> Some comments:
>
> Exceptions are not exceptional in this case but if there are invalid
> options or arguments but everything else is expected to succeed or
> fail. So I am not in favor to have excep
Hi all and Davey,
On Wed, Aug 3, 2016 at 4:36 PM, Davey Shafik wrote:
>
> Unfortunately this missed beta2 (tagged yesterday), I'll confirm with Joe
> about putting it in for 7.1beta3.
>
> Thanks for those last minute changes, I'm much happier with this result! :)
I just realized, php.ini-develop
27 matches
Mail list logo