Hi all,

> On Mar 11, 2020, at 11:36, Paul M. Jones <pmjo...@pmjones.io> wrote:
> 
> Conversation on this RFC seems to have diminished. As far as I know, I have 
> answered all criticisms/concerns/complaints one way or another.

FWIW, I have updated the Q&A points based on new discussion over the past day 
or so. The updated points are:


Q: The proposal compares and contrasts with HttpFoundation and the various 
PSR-7 implementations; how does it compare to other projects?

A: See this message for a starting point: 
https://externals.io/message/108436#108889. In short, the proposed 
functionality is representative of functionality common to the dozen-plus 
researched projects.


Q: Are these global single-instance objects?

A: No, you can create as many instances as you like, in whatever scopes you 
like.


Q: Do these objects replace the superglobals?

A: No.


Q: Do these objects deal with $_SESSION and the session functions?

A: No; it is explicitly out of scope for this RFC.


Q: Readonly properties are unusual for PHP.

A: Granted, though not unheard of. PdoStatement::$queryString is one precedent 
here. Further, of the researched userland projects, more than half of them 
present the relevant superglobals as nominally readonly in the public scope, 
making readonly access a reasonable choice here.


Q: Why is ServerRequest readonly, and ServerResponse mutable?

A: It makes sense that you would not want to change what you have received as a 
request; however, as you are in charge of creating the response, modifying it 
as needed seems reasonable. Further, the “readonly request with mutable 
response” matches half or more of the researched userland projects.


Q: What would a migration path look like?

A: Something like the one outlined in the later portion of this message: 
https://externals.io/message/108436#108893


-- 
Paul M. Jones
pmjo...@pmjones.io
http://paul-m-jones.com

Modernizing Legacy Applications in PHP
https://leanpub.com/mlaphp

Solving the N+1 Problem in PHP
https://leanpub.com/sn1php

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to