Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/40'
Browse files Browse the repository at this point in the history
Close #40
  • Loading branch information
weierophinney committed May 11, 2016
2 parents e08b401 + b795343 commit 79002c7
Show file tree
Hide file tree
Showing 18 changed files with 514 additions and 445 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
.*.sw*
.*.un~
nbproject
doc/html/
tmp/
vendor/
zf-mkdoc-theme/

clover.xml
composer.lock
coveralls-upload.json
phpunit.xml
vendor
23 changes: 22 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@ branches:

cache:
directories:
- $HOME/.composer/cache
- $HOME/.composer/
- $HOME/.local
- zf-mkdoc-theme

env:
global:
- SITE_URL: https://zendframework.github.io/zend-session
- GH_USER_NAME: "Matthew Weier O'Phinney"
- GH_USER_EMAIL: [email protected]
- GH_REF: github.com/zendframework/zend-session.git
- secure: "ig2TftPXHnxHzO9ho44sj5PnWfoKlHt6el7jzU80udzFIyhFBhgTGVC1I2kNLDJ8gvZitfuogxR/XYRMSTl2Pe/Te8hbza+PShlrqSG9C3PwApUof2BiuTNcIYjAp+RxQhjluKl/SmloUQhS8C1eb0WSnVfCjTQjlf+CIaJ+m1YaSVIkFjh3IyJgAglPdSB8Avst7xpYZF0cK723ZtyApUsuWoSHQjof54ziN+YDqWBfNovR1rWTmTNCfsBOHIhKTFhV0duXE+3MCnSTb3HogNtBuVKB842SU+8lnU1xaV7Ty3fE9nIB/j/mLC+MAGoZJshAv/o6ui3Y/41+oATllLgFnsy6+KvN6NiH449h2zMMy6cF3FILrYGpLpBafP3Yjxssdz9UaQtuNFRflGNpcoDAkw0x7+w5vX+yH7qibW4HQqyZLxeefZ22+F6NRPmsanJdPtZ7LKHMani3lNq9zWetNL8XaREwclSDK50HHhIygMAejr0OU5fVHmk30yZqGdiEcAoiabwgENt7ndeQPW6u3OOfzteo7dDZwWdZLbB1JWFmYbwQH4ek7KTIpQ8utH53qwg2PeLYg0W0y4g9Y46gGzaBIlsEE6RAIE8b8O3f6dPzRtTuHTJCS+AGQX61bqQUsph9jEIBsmVTVUHXNmLmOZnthPbzpPfza8v3EQM="

services:
- mongodb
Expand All @@ -27,6 +37,13 @@ matrix:
- php: 5.6
env:
- EXECUTE_TEST_COVERALLS=true
- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
- PATH="$HOME/.local/bin:$PATH"
- php: 5.6
env:
- EXECUTE_TEST_COVERALLS=true
- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
- PATH="$HOME/.local/bin:$PATH"
- php: 5.6
env:
- EVENT_MANAGER_VERSION="^2.6.2"
Expand Down Expand Up @@ -65,6 +82,10 @@ script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then ./vendor/bin/phpunit ; fi
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run ; fi
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi

after_success:
- if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi

after_script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/coveralls ; fi
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

All notable changes to this project will be documented in this file, in reverse chronological order by release.

## 2.7.1 - TBD
## 2.7.1 - 2016-05-11

### Added

- Nothing.
- [#40](https://github.com/zendframework/zend-session/pull/40) adds and
publishes the documentation to https://zendframework.github.io/zend-session/

### Deprecated

Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
[![Build Status](https://secure.travis-ci.org/zendframework/zend-session.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-session)
[![Coverage Status](https://coveralls.io/repos/zendframework/zend-session/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-session?branch=master)

`Zend\Session` is a component to manage PHP session using an object oriented
interface.

zend-session manages PHP sessions using an object oriented interface.

- File issues at https://github.com/zendframework/zend-session/issues
- Documentation is at http://framework.zend.com/manual/current/en/index.html#zend-session
- Documentation is at https://zendframework.github.io/zend-session/
56 changes: 31 additions & 25 deletions doc/book/zend.session.config.md → doc/book/config.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Session Config

Zend Framework comes with a standard set of config classes which are ready for you to use. Config
handles setting various configuration such as where a cookie lives, lifetime, including several bits
to configure ext/session when using `Zend\Session\Config\SessionConfig`.
zend-session comes with a standard set of config classes, allowing setting where
a cookie lives, session lifetime, and even configuration of ext/session when
using `Zend\Session\Config\SessionConfig`.

## Standard Config

`Zend\Session\Config\StandardConfig` provides you a basic interface for implementing sessions when
*not* leveraging ext/session. This is utilized more for specialized cases such as when you might
have session management done by another system.
`Zend\Session\Config\StandardConfig` provides the base interface for
configuring sessions when *not* leveraging ext/session. This is utilized more
for specialized cases, such as when you might have session management done by
another system, or when testing.

### Basic Configuration Options

Expand All @@ -35,8 +36,6 @@ Option | Data Type | Description

### Basic Usage

A basic example is one like the following:

```php
use Zend\Session\Config\StandardConfig;
use Zend\Session\SessionManager;
Expand All @@ -51,14 +50,15 @@ $manager = new SessionManager($config);

## Session Config

`Zend\Session\Config\SessionConfig` provides you a basic interface for implementing sessions when
that leverage PHP's ext/session. Most configuration options configure either the
`Zend\Session\Storage` OR configure ext/session directly.
`Zend\Session\Config\SessionConfig` provides an interface for configuring
sessions that leverage PHP's ext/session. Most configuration options configure
either the `Zend\Session\Storage` OR configure ext/session directly.

### Basic Configuration Options

The following configuration options are defined by `Zend\Session\Config\SessionConfig`, note that it
inherits all configuration from `Zend\Session\Config\StandardConfig`.
The following configuration options are defined by `Zend\Session\Config\SessionConfig`;
note that it inherits all configuration from
`Zend\Session\Config\StandardConfig`.

Option | Data Type | Description
------------------- | --------- | -----------
Expand All @@ -71,8 +71,6 @@ Option | Data Type | Description

### Basic Usage

A basic example is one like the following:

```php
use Zend\Session\Config\SessionConfig;
use Zend\Session\SessionManager;
Expand All @@ -87,11 +85,12 @@ $manager = new SessionManager($config);

### Service Manager Factory

`Zend\Session` ships with a Service Manager <zend.service-manager.intro> factory which reads
configuration data from the application configuration and injects a corresponding instance of
`Zend\Session\Config\SessionConfig` into the session manager automatically.
zend-session ships with a [zend-servicemanager](https://zendframework.github.io/zend-servicemanager/)
factory which reads configuration data from the application configuration and
injects a corresponding instance of `Zend\Session\Config\SessionConfig` into the
session manager automatically.

To use this factory, you first need to register it with the Service Manager by adding the
To use this factory, you first need to register it with the service manager by adding the
appropriate factory definition:

```php
Expand All @@ -102,8 +101,14 @@ appropriate factory definition:
],
```

Then place your application's session configuration in the root-level configuration key
`session_config`:
> #### Automated factory registration
>
> Starting with zend-mvc v3, if you are using the [component installer](https://zendframework.github.io/zend-component-installer)
> in your application, the above registration will be made automatically for
> you when you install zend-session.
Then place your application's session configuration in the root-level
configuration key `session_config`:

```php
'session_config' => [
Expand All @@ -121,7 +126,8 @@ Option | Data Type | Description

## Custom Configuration

In the event that you prefer to create your own session configuration; you *must* implement
`Zend\Session\Config\ConfigInterface` which contains the basic interface for items needed when
implementing a session. This includes cookie configuration, lifetime, session name, save path and an
interface for getting and setting options.
In the event that you prefer to create your own session configuration; you
*must* implement `Zend\Session\Config\ConfigInterface` which contains the basic
interface for items needed when implementing a session. This includes cookie
configuration, lifetime, session name, save path, and an interface for getting
and setting options.
17 changes: 9 additions & 8 deletions doc/book/zend.session.container.md → doc/book/container.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Session Container

`Zend\Session\Container` instances provide the primary API for manipulating session data in the Zend
Framework. Containers are used to segregate all session data, although a default namespace exists
for those who only want one namespace for all their session data.
`Zend\Session\Container` instances provide the primary API for manipulating
session data in zend-session. Containers are used to segregate all session
data, although a default namespace exists for those who only want one namespace
for all their session data.

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

## Basic Usage

Expand All @@ -19,8 +20,8 @@ $container->item = 'foo';

## Setting the Default Session Manager

In the event you are using multiple session managers or prefer to be explicit, the default session
manager that is utilized can be explicitly set.
In the event you are using multiple session managers or prefer to be explicit,
the default session manager that is utilized can be explicitly set.

```php
use Zend\Session\Container;
Expand Down
10 changes: 10 additions & 0 deletions doc/book/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div class="container">
<div class="jumbotron">
<h1>zend-session</h1>

<p>Object-oriented interface to PHP sessions and storage.</p>

<pre><code class="language-bash">$ composer require zendframework/zend-session</code></pre>
</div>
</div>

1 change: 1 addition & 0 deletions doc/book/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../../README.md
Loading

0 comments on commit 79002c7

Please sign in to comment.