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

Commit

Permalink
Merge e32b4c7 into 0a74768
Browse files Browse the repository at this point in the history
  • Loading branch information
bacinsky committed Aug 16, 2013
2 parents 0a74768 + e32b4c7 commit c964aa9
Show file tree
Hide file tree
Showing 160 changed files with 6,513 additions and 2,076 deletions.
1 change: 1 addition & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src_dir: library
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ before_install:
script:
- ant travis -keep-going

after_script:
- php vendor/bin/coveralls

notifications:
irc: "irc.freenode.org#zftalk.dev"
email: false
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
### Welcome to the *Zend Framework 2.2* Release!
### Welcome to the *Zend Framework 2.3* Release!

Master: [![Build Status](https://secure.travis-ci.org/zendframework/zf2.png?branch=master)](http://travis-ci.org/zendframework/zf2)
Develop: [![Build Status](https://secure.travis-ci.org/zendframework/zf2.png?branch=develop)](http://travis-ci.org/zendframework/zf2)
Master:
[![Build Status](https://secure.travis-ci.org/zendframework/zf2.png?branch=master)](http://travis-ci.org/zendframework/zf2)
[![Coverage Status](https://coveralls.io/repos/zendframework/zf2/badge.png?branch=master)](https://coveralls.io/r/zendframework/zf2)
Develop:
[![Build Status](https://secure.travis-ci.org/zendframework/zf2.png?branch=develop)](http://travis-ci.org/zendframework/zf2)
[![Coverage Status](https://coveralls.io/repos/zendframework/zf2/badge.png?branch=develop)](https://coveralls.io/r/zendframework/zf2)

## RELEASE INFORMATION

*Zend Framework 2.2.3dev*
*Zend Framework 2.3.0dev*

This is the third maintenance release for the 2.2 series.
This is the third minor (feature) release for the version 2 series.

DD MMM YYYY
DD MMM YYY

### UPDATES IN 2.2.3
### UPDATES IN 2.3.0

Please see [CHANGELOG.md](CHANGELOG.md).

Expand Down
24 changes: 22 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="ZF2" default="build">
<target name="travis" depends="tests-parallel,show-test-results" />
<target name="travis" depends="tests-parallel,merge-clover,show-test-results" />

<target name="clean" description="Cleanup build artifacts">
<delete dir="${basedir}/build"/>
Expand All @@ -9,6 +9,8 @@
<target name="prepare" depends="clean" description="Prepare for build">
<mkdir dir="${basedir}/build/test-results"/>
<mkdir dir="${basedir}/build/cs-results"/>
<mkdir dir="${basedir}/build/coverage"/>
<mkdir dir="${basedir}/build/logs"/>
</target>

<target name="get-cs-fixer" depends="clean" description="Get coding standards fixer">
Expand All @@ -24,14 +26,30 @@
<arg value="--version" />
</exec>
<exec executable="composer" failonerror="true">
<env key="COMPOSER_ROOT_VERSION" value="dev-master"/>
<env key="COMPOSER_ROOT_VERSION" value="dev-develop"/>
<arg value="install" />
<arg value="--dev" />
<arg value="--prefer-source" />
</exec>
</sequential>
</target>

<target name="merge-clover" description="Merges the individual clover reports of each component into a single clover.xml">
<sequential>
<exec executable="php" failonerror="true">
<arg value="-d" />
<arg value="memory_limit=-1" />
<arg value="vendor/bin/phpcov.php" />
<arg value="--merge" />
<arg value="--clover" />
<arg value="${basedir}/build/logs/clover.xml" />
<arg value="--whitelist" />
<arg value="${basedir}/library" />
<arg value="${basedir}/build/coverage" />
</exec>
</sequential>
</target>

<target
name="tests-parallel"
depends="prepare,composer-install,get-cs-fixer"
Expand Down Expand Up @@ -119,6 +137,8 @@
>
<arg value="-c" />
<arg value="${basedir}/tests/phpunit.xml.dist" />
<arg value="--coverage-php" />
<arg value="${basedir}/build/coverage/coverage-@{component}.cov" />
<arg value="${basedir}/tests/ZendTest/@{component}" />
</exec>
</sequential>
Expand Down
25 changes: 24 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@
],
"homepage": "http://framework.zend.com/",
"license": "BSD-3-Clause",
"repositories": [
{
"type": "package",
"package": {
"name": "sebastianbergmann/phpcov",
"version": "1.1.0",
"dist": {
"url": "https://github.com/sebastianbergmann/phpcov/archive/1.1.0.zip",
"type": "zip"
},
"source": {
"url": "https://github.com/sebastianbergmann/phpcov.git",
"type": "git",
"reference": "1.1.0"
},
"bin": [
"phpcov.php"
]
}
}
],
"require": {
"php": ">=5.3.3"
},
Expand All @@ -16,7 +37,9 @@
"ircmaxell/random-lib": "dev-master",
"ircmaxell/security-lib": "dev-master",
"ocramius/proxy-manager": "0.4.*",
"phpunit/PHPUnit": "3.7.*"
"phpunit/PHPUnit": "3.7.*",
"satooshi/php-coveralls": "dev-master",
"sebastianbergmann/phpcov": "1.1.0"
},
"suggest": {
"ext-intl": "ext/intl for i18n features (included in default builds of PHP)",
Expand Down
41 changes: 29 additions & 12 deletions library/Zend/Authentication/Adapter/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,11 @@ public function authenticate()

$headers = $this->request->getHeaders();
if (!$headers->has($getHeader)) {
return $this->_challengeClient();
return $this->challengeClient();
}
$authHeader = $headers->get($getHeader)->getFieldValue();
if (!$authHeader) {
return $this->_challengeClient();
return $this->challengeClient();
}

list($clientScheme) = explode(' ', $authHeader);
Expand All @@ -360,7 +360,7 @@ public function authenticate()
// client sent a scheme that is not the one required
if (!in_array($clientScheme, $this->acceptSchemes)) {
// challenge again the client
return $this->_challengeClient();
return $this->challengeClient();
}

switch ($clientScheme) {
Expand All @@ -377,6 +377,23 @@ public function authenticate()
return $result;
}

/**
* @deprecated
* @see Http::challengeClient()
* @return Authentication\Result Always returns a non-identity Auth result
*/
protected function _challengeClient()
{
trigger_error(sprintf(
'The method "%s" is deprecated and will be removed in the future; '
. 'please use the public method "%s::challengeClient()" instead',
__METHOD__,
__CLASS__
), E_USER_DEPRECATED);

return $this->challengeClient();
}

/**
* Challenge Client
*
Expand All @@ -385,7 +402,7 @@ public function authenticate()
*
* @return Authentication\Result Always returns a non-identity Auth result
*/
protected function _challengeClient()
public function challengeClient()
{
if ($this->imaProxy) {
$statusCode = 407;
Expand Down Expand Up @@ -474,12 +491,12 @@ protected function _basicAuth($header)
// implementation does. If invalid credentials are detected,
// re-challenge the client.
if (!ctype_print($auth)) {
return $this->_challengeClient();
return $this->challengeClient();
}
// Fix for ZF-1515: Now re-challenges on empty username or password
$creds = array_filter(explode(':', $auth));
if (count($creds) != 2) {
return $this->_challengeClient();
return $this->challengeClient();
}

$result = $this->basicResolver->resolve($creds[0], $this->realm, $creds[1]);
Expand All @@ -498,7 +515,7 @@ protected function _basicAuth($header)
return new Authentication\Result(Authentication\Result::SUCCESS, $result);
}

return $this->_challengeClient();
return $this->challengeClient();
}

/**
Expand Down Expand Up @@ -530,17 +547,17 @@ protected function _digestAuth($header)
// See ZF-1052. This code was a bit too unforgiving of invalid
// usernames. Now, if the username is bad, we re-challenge the client.
if ('::invalid::' == $data['username']) {
return $this->_challengeClient();
return $this->challengeClient();
}

// Verify that the client sent back the same nonce
if ($this->_calcNonce() != $data['nonce']) {
return $this->_challengeClient();
return $this->challengeClient();
}
// The opaque value is also required to match, but of course IE doesn't
// play ball.
if (!$this->ieNoOpaque && $this->_calcOpaque() != $data['opaque']) {
return $this->_challengeClient();
return $this->challengeClient();
}

// Look up the user's password hash. If not found, deny access.
Expand All @@ -549,7 +566,7 @@ protected function _digestAuth($header)
// to be recreatable with the current settings of this object.
$ha1 = $this->digestResolver->resolve($data['username'], $data['realm']);
if ($ha1 === false) {
return $this->_challengeClient();
return $this->challengeClient();
}

// If MD5-sess is used, a1 value is made of the user's password
Expand Down Expand Up @@ -588,7 +605,7 @@ protected function _digestAuth($header)
return new Authentication\Result(Authentication\Result::SUCCESS, $identity);
}

return $this->_challengeClient();
return $this->challengeClient();
}

/**
Expand Down
14 changes: 13 additions & 1 deletion library/Zend/Authentication/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,23 @@
"php": ">=5.3.3",
"zendframework/zend-stdlib": "self.version"
},
"require-dev": {
"zendframework/zend-db": "self.version",
"zendframework/zend-crypt": "self.version",
"zendframework/zend-http": "self.version",
"zendframework/zend-ldap": "self.version",
"zendframework/zend-session": "self.version",
"zendframework/zend-validator": "self.version",
"zendframework/zend-uri": "self.version"
},
"suggest": {
"zendframework/zend-db": "Zend\\Db component",
"zendframework/zend-crypt": "Zend\\Crypt component",
"zendframework/zend-http": "Zend\\Http component",
"zendframework/zend-ldap": "Zend\\Ldap component",
"zendframework/zend-session": "Zend\\Session component",
"zendframework/zend-uri": "Zend\\Uri component",
"zendframework/zend-session": "Zend\\Session component"
"zendframework/zend-validator": "Zend\\Validator component"
},
"extra": {
"branch-alias": {
Expand Down
3 changes: 3 additions & 0 deletions library/Zend/Barcode/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@
"zendframework/zend-stdlib": "self.version"
},
"require-dev": {
"zendframework/zend-servicemanager": "self.version",
"zendframework/zend-validator": "self.version",
"zendframework/zendpdf": "*"
},
"suggest": {
"zendframework/zend-servicemanager": "Zend\\ServiceManager component",
"zendframework/zend-validator": "Zend\\Validator component",
"zendframework/zendpdf": "ZendPdf component"
},
Expand Down
15 changes: 15 additions & 0 deletions library/Zend/Cache/Storage/Adapter/Apc.php
Original file line number Diff line number Diff line change
Expand Up @@ -734,4 +734,19 @@ protected function normalizeMetadata(array & $metadata)
$metadata['num_hits']
);
}

/**
* Internal method to set an item only if token matches
*
* @param mixed $token
* @param string $normalizedKey
* @param mixed $value
* @return bool
* @see getItem()
* @see setItem()
*/
protected function internalCheckAndSetItem(& $token, & $normalizedKey, & $value)
{
return apc_cas($normalizedKey, $token, $value);
}
}

0 comments on commit c964aa9

Please sign in to comment.