• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

bin/H13-Jul-2017-888581

library/H13-Jul-2017-312,187162,427

resources/H03-May-2022-8,0544,551

.coveralls.ymlH A D13-Jul-201717 21

CHANGELOG.mdH A D13-Jul-2017273 KiB3,6903,536

CONTRIBUTING.mdH A D13-Jul-20173.2 KiB9063

INSTALL.mdH A D13-Jul-20172.2 KiB6442

README-GIT.mdH A D13-Jul-20177.6 KiB279208

README.mdH A D13-Jul-20173.1 KiB8049

composer.jsonH A D13-Jul-20174.5 KiB108107

composer.lockH A D13-Jul-201783.4 KiB2,4602,459

README-GIT.md

1# USING THE GIT REPOSITORY
2
3## Setup your own public repository
4
5Your first step is to establish a public repository from which we can
6pull your work into the master repository. You have two options: use
7GitHub or other public site, or setup/use your own repository.
8
9While you can use a private repository and utilize ``git format-patch`` to
10submit patches, this is discouraged as it does not facilitate public peer
11review.
12
13### Option 1: GitHub
14
15 1. Setup a GitHub account (http://github.com/), if you haven't yet
16 2. Fork the ZF2 repository (http://github.com/zendframework/zf2)
17 3. Clone your fork locally and enter it (use your own GitHub username
18    in the statement below)
19
20    ```sh
21    % git clone git@github.com:<username>/zf2.git
22    % cd zf2
23    ```
24
25 4. Add a remote to the canonical ZF repository, so you can keep your fork
26    up-to-date:
27
28    ```sh
29    % git remote add zf2 https://github.com/zendframework/zf2.git
30    % git fetch zf2
31    ```
32
33### Option 2: Personal Repository
34
35We assume you will use gitosis (http://git-scm.com/book/en/Git-on-the-Server-Gitosis)
36or gitolite (http://git-scm.com/book/en/Git-on-the-Server-Gitolite) to host your
37own repository.  If you go this route, we will assume you have the knowledge to
38do so, or know where to obtain it. We will not assist you in setting up such a
39repository.
40
41 1.  Create a new repository
42
43    ```sh
44    % git init
45    ```
46
47 2. Add an "origin" remote pointing to your gitosis/gitolite repo:
48
49    ```sh
50    % git remote add origin git://yourdomain/yourrepo.git
51    ```
52
53 3. Add a remote for the ZF repository and fetch it
54
55    ```sh
56    % git remote add zf2 https://github.com/zendframework/zf2.git
57    % git fetch zf2
58    ```
59
60 4. Create a new branch for the ZF repository (named "zf/master" here)
61
62    ```sh
63    % git checkout -b zf/master zf2/master
64    ```
65
66 5. Create your master branch off the ZF branch, and push to your
67    repository
68
69    ```sh
70    % git checkout -b master
71    % git push origin HEAD:master
72    ```
73
74### Pre-Commit Hook (Optional)
75
76The ZF2 Travis-CI will confirm that code style standards are met
77by using ```php-cs-fixer``` (https://github.com/FriendsOfPHP/PHP-CS-Fixer) during its build runs.
78
79To reduce the number of red Travis-CI builds, the following Git pre-commit hook
80can help catch code style issues before committing. Save it as
81```.git/hooks/pre-commit```, and make sure it is executable.
82
83```php
84#!/usr/bin/env php
85<?php
86/**
87 * .git/hooks/pre-commit
88 *
89 * This pre-commit hooks will check for PHP errors (lint), and make sure the
90 * code is PSR-2 compliant.
91 *
92 * Dependency: PHP-CS-Fixer (https://github.com/FriendsOfPHP/PHP-CS-Fixer)
93 *
94 * @author  Mardix  http://github.com/mardix
95 * @author  Matthew Weier O'Phinney http://mwop.net/
96 * @since   4 Sept 2012
97 */
98
99$exit = 0;
100
101/*
102 * collect all files which have been added, copied or
103 * modified and store them in an array called output
104 */
105$output = array();
106exec('git diff --cached --name-status --diff-filter=ACM', $output);
107
108foreach ($output as $file) {
109    if ('D' === substr($file, 0, 1)) {
110        // deleted file; do nothing
111        continue;
112    }
113
114    $fileName = trim(substr($file, 1));
115
116    /*
117     * Only PHP files
118     */
119    $extension = pathinfo($fileName, PATHINFO_EXTENSION);
120    if (!preg_match('/^ph(p|tml)$/', $extension)) {
121        continue;
122    }
123
124    /*
125     * Check for parse errors
126     */
127    $output = array();
128    $return = 0;
129    exec("php -l " . escapeshellarg($fileName), $output, $return);
130
131    if ($return != 0) {
132        echo "PHP file fails to parse: " . $fileName . ":" . PHP_EOL;
133        echo implode(PHP_EOL, $output) . PHP_EOL;
134        $exit = 1;
135        continue;
136    }
137
138    /*
139     * PHP-CS-Fixer
140     */
141    $output = array();
142    $return = null;
143    exec("php-cs-fixer fix --dry-run --level=psr2 " . escapeshellarg($fileName), $output, $return);
144    if ($return != 0 || !empty($output)) {
145        echo "PHP file contains CS issues: " . $fileName . ":" . PHP_EOL;
146        echo implode(PHP_EOL, $output) . PHP_EOL;
147        $exit = 1;
148        continue;
149    }
150}
151
152exit($exit);
153```
154
155## Keeping Up-to-Date
156
157Periodically, you should update your fork or personal repository to
158match the canonical ZF repository. In each of the above setups, we have
159added a remote to the Zend Framework repository, which allows you to do
160the following:
161
162
163```sh
164% git checkout master
165% git pull zf2 master
166- OPTIONALLY, to keep your remote up-to-date -
167% git push origin
168```
169
170If you're tracking other branches -- for example, the "develop" branch, where
171new feature development occurs -- you'll want to do the same operations for that
172branch; simply substitute  "develop" for "master".
173
174## Working on Zend Framework
175
176When working on Zend Framework, we recommend you do each new feature or
177bugfix in a new branch. This simplifies the task of code review as well
178as of merging your changes into the canonical repository.
179
180A typical work flow will then consist of the following:
181
182 1. Create a new local branch based off your master branch.
183 2. Switch to your new local branch. (This step can be combined with the
184    previous step with the use of `git checkout -b`.)
185 3. Do some work, commit, repeat as necessary.
186 4. Push the local branch to your remote repository.
187 5. Send a pull request.
188
189The mechanics of this process are actually quite trivial. Below, we will
190create a branch for fixing an issue in the tracker.
191
192```sh
193% git checkout -b zf9295
194Switched to a new branch 'zf9295'
195```
196... do some work ...
197
198```sh
199% git commit
200```
201... write your log message ...
202
203```sh
204% git push origin HEAD:zf9295
205Counting objects: 38, done.
206Delta compression using up to 2 threads.
207Compression objects: 100% (18/18), done.
208Writing objects: 100% (20/20), 8.19KiB, done.
209Total 20 (delta 12), reused 0 (delta 0)
210To ssh://git@github.com/weierophinney/zf2.git
211   b5583aa..4f51698  HEAD -> master
212```
213
214
215To send a pull request, you have two options.
216
217If using GitHub, you can do the pull request from there. Navigate to
218your repository, select the branch you just created, and then select the
219"Pull Request" button in the upper right. Select the user
220"zendframework" as the recipient.
221
222If using your own repository - or even if using GitHub - you can send an
223email indicating you have changes to pull:
224
225 -  Send to <zf-devteam@zend.com>
226
227 -  In your message, specify:
228     -  The URL to your repository (e.g., `git://mwop.net/zf2.git`)
229     -  The branch containing the changes you want pulled (e.g., `zf9295`)
230     -  The nature of the changes (e.g., `implements
231        Zend_Service_Twitter`, `fixes ZF-9295`, etc.)
232
233### What branch to issue the pull request against?
234
235Which branch should you issue a pull request against?
236
237- For fixes against the stable release, issue the pull request against the
238  "master" branch.
239- For new features, or fixes that introduce new elements to the public API (such
240  as new public methods or properties), issue the pull request against the
241  "develop" branch.
242
243## Branch Cleanup
244
245As you might imagine, if you are a frequent contributor, you'll start to
246get a ton of branches both locally and on your remote.
247
248Once you know that your changes have been accepted to the master
249repository, we suggest doing some cleanup of these branches.
250
251 -  Local branch cleanup
252
253    ```sh
254    % git branch -d <branchname>
255    ```
256
257 -  Remote branch removal
258
259    ```sh
260    % git push origin :<branchname>
261    ```
262
263
264## FEEDS AND EMAILS
265
266RSS feeds may be found at:
267
268`https://github.com/zendframework/zf2/commits/<branch>.atom`
269
270where &lt;branch&gt; is a branch in the repository.
271
272To subscribe to git email notifications, simply watch or fork the zf2 repository
273on GitHub.
274
275## CONTRIBUTORS AND COMMITTERS
276
277Both Zend's internal Zend Framework team and the members of the Community Review
278team have push privileges to the ZF2 repository.
279

README.md

1![Logo](https://raw.githubusercontent.com/zendframework/zf2/234b554f2ca202095aea32e4fa557553f8849664/resources/ZendFramework-logo.png)
2
3# Welcome to the *Zend Framework 2.4* Release!
4
5Master:
6[![Build Status](https://secure.travis-ci.org/zendframework/zf2.svg?branch=master)](http://travis-ci.org/zendframework/zf2)
7[![Coverage Status](https://coveralls.io/repos/zendframework/zf2/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zf2)
8Develop:
9[![Build Status](https://secure.travis-ci.org/zendframework/zf2.svg?branch=develop)](http://travis-ci.org/zendframework/zf2)
10[![Coverage Status](https://coveralls.io/repos/zendframework/zf2/badge.svg?branch=develop)](https://coveralls.io/r/zendframework/zf2)
11
12## RELEASE INFORMATION
13
14*Zend Framework 2.4.13*
15
16This is a maintenance release in the version 2.4 series.
17
1813 July 2017
19
20### UPDATES IN 2.4.13
21
22Please see [CHANGELOG.md](CHANGELOG.md).
23
24### SYSTEM REQUIREMENTS
25
26Zend Framework 2 requires PHP 5.3.23 or later; we recommend using the
27latest PHP version whenever possible.
28
29### INSTALLATION
30
31Please see [INSTALL.md](INSTALL.md).
32
33### CONTRIBUTING
34
35If you wish to contribute to Zend Framework, please read both the
36[CONTRIBUTING.md](CONTRIBUTING.md) and [README-GIT.md](README-GIT.md) file.
37
38### QUESTIONS AND FEEDBACK
39
40Online documentation can be found at http://framework.zend.com/manual.
41Questions that are not addressed in the manual should be directed to the
42appropriate mailing list:
43
44http://framework.zend.com/archives/subscribe/
45
46If you find code in this release behaving in an unexpected manner or
47contrary to its documented behavior, please create an issue in our GitHub
48issue tracker:
49
50https://github.com/zendframework/zf2/issues
51
52If you would like to be notified of new releases, you can subscribe to
53the fw-announce mailing list by sending a blank message to
54<fw-announce-subscribe@lists.zend.com>.
55
56## Reporting Potential Security Issues
57
58If you have encountered a potential security vulnerability in Zend Framework, please report it to us at [zf-security@zend.com](mailto:zf-security@zend.com). We will work with you to verify the vulnerability and patch it.
59
60When reporting issues, please provide the following information:
61
62- Component(s) affected
63- A description indicating how to reproduce the issue
64- A summary of the security vulnerability and impact
65
66We request that you contact us via the email address above and give the project contributors a chance to resolve the vulnerability and issue a new release prior to any public exposure; this helps protect Zend Framework users and provides them with a chance to upgrade and/or update in order to protect their applications.
67
68For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc).
69
70### LICENSE
71
72The files in this archive are released under the Zend Framework license.
73You can find a copy of this license in [LICENSE.txt](LICENSE.txt).
74
75### ACKNOWLEDGEMENTS
76
77The Zend Framework team would like to thank all the [contributors](https://github.com/zendframework/zf2/contributors) to the Zend
78Framework project, our corporate sponsor, and you, the Zend Framework user.
79Please visit us sometime soon at http://framework.zend.com.
80