Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation clarifications - ext/session vs. ext-session, and "entry of" vs. "entry in" #1

Open
weierophinney opened this issue Dec 31, 2019 · 5 comments

Comments

@weierophinney
Copy link
Member

The documentation at https://docs.zendframework.com/zend-session/config/
says

Zend\Session\Config\StandardConfig provides the base interface for configuring sessions when not leveraging ext/session

What is ext/session? Do they mean the "PHP session extension"?

If so, I'll do a PR with a global search/replace, because that really threw me off.

Also, https://docs.zendframework.com/zend-session/container/ says:

Each instance of Zend\Session\Container corresponds to an entry of the Zend\Session\Storage, where the namespace is used as the key.

What's meant by "corresponds to an entry of"? Do they mean "is an entry in"?


Originally posted by @bitwombat at zendframework/zend-session#125

@weierophinney
Copy link
Member Author

Yes, ext/session is the PHP session extension. It is commonly referred to as ext-session or ext/session. This is true of most extensions, and the former example (ext-session) is in fact the one Composer users to mark an extension as a requirement.

With regards to your second question, containers are namespaced. You give a container a name, such as "user", and all entries in that container are part of that virtual namespace. The name of the container then becomes an entry in the storage used. So, yes, a container corresponds to an entry in the storage. In my example, the "user" container becomes a "user" entry in the storage, containing all the values the container has.


Originally posted by @weierophinney at zendframework/zend-session#125 (comment)

@weierophinney
Copy link
Member Author

Might be common, but it tripped me up and I'm not new to PHP. FWIW https://docs.zendframework.com/zend-expressive-session-ext/intro/ calls it

the PHP ext-session

And, as you point out, composer calls them ext-*. Dunno, must just be me, and I'm busy enough otherwise.

"entry in" vs. "entry of" - I'll make a record-setting-tiny PR for that :)


Originally posted by @bitwombat at zendframework/zend-session#125 (comment)

@weierophinney
Copy link
Member Author

I know the spelling "ext/session" from PHP's "Test and Code Coverage Analysis":

But it doesn't matter. In the documentation we need a consistent spelling.
I suggest to use "ext-session" which correlates with:

  • Composer
  • zend-expressive-session-ext
  • and with some other descriptions and pages in code and documentation

@bitwombat
Can you provide a pull request, please?


(Or we use the long wording: "PHP's session extension". But this means we have to rewrite the title of zend-expressive-session-ext: "PSR-7 Sessions via ext-session".)


Originally posted by @froschdesign at zendframework/zend-session#125 (comment)

@weierophinney
Copy link
Member Author

Will do @froschdesign.

I look at it as sort of namespace/context. ext-session could be a ZF thing otherwise.

But first, would it be OK with you if the body text was more explicit (ie. "PHP's ext-session"), allowing us to feel consistent while leaving the title of zend-expressive-session-ext alone?


Originally posted by @bitwombat at zendframework/zend-session#125 (comment)

@weierophinney
Copy link
Member Author

@bitwombat

"PHP's ext-session"

Go for it! 👍


Originally posted by @froschdesign at zendframework/zend-session#125 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant