Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bdbd7b9

Browse files
committed
pt_BR files added
1 parent 325d45a commit bdbd7b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+5887
-0
lines changed

pt_BR/contributing/code/bugs.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Reporting a Bug
2+
===============
3+
4+
Whenever you find a bug in Symfony, we kindly ask you to report it. It helps
5+
us make a better Symfony.
6+
7+
.. caution::
8+
If you think you've found a security issue, please use the special
9+
doc:`procedure <security>` instead.
10+
11+
Before submitting a bug:
12+
13+
* Double-check the official documentation to see if you're not misusing the
14+
framework;
15+
16+
* Ask assistance on the users mailing-list or on the #symfony IRC channel if
17+
you're not sure if your issue is really a bug.
18+
19+
If your problem definitely looks like a bug, report it using the official bug
20+
`tracker`_ and follow some basic rules:
21+
22+
* Use the title field to clearly describe the issue;
23+
24+
* Describe the steps needed to reproduce the bug with short code examples
25+
(providing a unit test that illustrates the bug is better);
26+
27+
* Give as much details as possible about your environment (OS, PHP version,
28+
Symfony version, extension enabled, ...);
29+
30+
* *(optional)* Attach a :doc:`patch <patches>`.
31+
32+
.. _tracker: http://trac.symfony-project.org/

pt_BR/contributing/code/index.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Contributing Code
2+
=================
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
7+
bugs
8+
patches
9+
security
10+
standards
11+
tests
12+
license

pt_BR/contributing/code/license.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Symfony2 License
2+
================
3+
4+
Symfony2 is released under the MIT license.
5+
6+
According to `Wikipedia`_:
7+
8+
"It is a permissive license, meaning that it permits reuse within
9+
proprietary software on the condition that the license is distributed with
10+
that software. The license is also GPL-compatible, meaning that the GPL
11+
permits combination and redistribution with software that uses the MIT
12+
License."
13+
14+
The License
15+
-----------
16+
17+
Copyright (c) 2004-2010 Fabien Potencier
18+
19+
Permission is hereby granted, free of charge, to any person obtaining a copy
20+
of this software and associated documentation files (the "Software"), to deal
21+
in the Software without restriction, including without limitation the rights
22+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23+
copies of the Software, and to permit persons to whom the Software is furnished
24+
to do so, subject to the following conditions:
25+
26+
The above copyright notice and this permission notice shall be included in all
27+
copies or substantial portions of the Software.
28+
29+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
35+
THE SOFTWARE.
36+
37+
.. _Wikipedia: http://en.wikipedia.org/wiki/MIT_License

pt_BR/contributing/code/patches.rst

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
Submitting a Patch
2+
==================
3+
4+
Patches are the best way to provide a bug fix or to propose enhancements to
5+
Symfony.
6+
7+
Initial Setup
8+
-------------
9+
10+
Before working on Symfony2, setup a friendly environment with the following
11+
software:
12+
13+
* Git;
14+
15+
* PHP version 5.3.2 or above;
16+
17+
* PHPUnit 3.5.0 or above.
18+
19+
Set up your user information with your real name and a working email address:
20+
21+
.. code-block:: bash
22+
23+
$ git config --global user.name "Your Name"
24+
$ git config --global user.email [email protected]
25+
26+
.. tip::
27+
If you are new to Git, we highly recommend you to read the excellent and free
28+
`ProGit`_ book.
29+
30+
Get the Symfony2 code source:
31+
32+
* Create a `Github`_ account and sign in;
33+
34+
* Fork the `Symfony2 repository`_ (click on the "Fork" button);
35+
36+
* After the "hardcore forking action" has completed, clone your fork locally
37+
(this will create a `symfony` directory):
38+
39+
.. code-block:: bash
40+
41+
$ git clone [email protected]:USERNAME/symfony.git
42+
43+
* Add the upstream repository as remote:
44+
45+
.. code-block:: bash
46+
47+
$ cd symfony
48+
$ git remote add upstream git://github.com/fabpot/symfony.git
49+
50+
Now that Symfony2 is installed, check that all unit tests pass for your
51+
environment as explained in the dedicated :doc:`document <tests>`.
52+
53+
Working on a Patch
54+
------------------
55+
56+
Each time you want to work on a patch for a bug or on an enhancement, create a
57+
topic branch:
58+
59+
.. code-block:: bash
60+
61+
$ git checkout -b BRANCH_NAME
62+
63+
.. tip::
64+
Use a descriptive name for your branch (`ticket_XXX` where `XXX` is the ticket
65+
number is a good convention for bug fixes).
66+
67+
The above command automatically switches the code to the newly created branch
68+
(check the branch you are working on with `git branch`.)
69+
70+
Work on the code as much as you want and commit as much as you want; but keep
71+
in mind the following:
72+
73+
* Follow the coding :doc:`standards <standards>` (use `git diff --check` to
74+
check for trailing spaces);
75+
76+
* Add unit tests to prove that the bug is fixed or that the new feature
77+
actually works;
78+
79+
* Do atomic and logically separate commits (use the power of `git rebase` to
80+
have a clean and logical history);
81+
82+
* Write good commit messages.
83+
84+
.. tip::
85+
A good commit message is composed of a summary (the first line), optionally
86+
followed by a blank line and a more detailed description. The summary should
87+
start with the Component you are working on in square brackets
88+
(`[DependencyInjection]`, `[FoundationBundle]`, ...). Use a verb (`fixed ...`,
89+
`added ...`, ...) to start the summary and don't add a period at the end.
90+
91+
Submitting a Patch
92+
------------------
93+
94+
Before submitting your patch, update your branch (needed if it takes you a
95+
while to finish your changes):
96+
97+
.. code-block:: bash
98+
99+
$ git checkout master
100+
$ git fetch upstream
101+
$ git merge upstream/master
102+
$ git checkout BRANCH_NAME
103+
$ git rebase master
104+
105+
When doing the `rebase` command, you might have to fix merge conflicts. `git
106+
st` gives you the *unmerged* files. Resolve all conflicts, then continue the
107+
rebase:
108+
109+
.. code-block:: bash
110+
111+
$ git add ... # add resolved files
112+
$ git rebase --continue
113+
114+
Check that all tests still pass and push your branch remotely:
115+
116+
.. code-block:: bash
117+
118+
$ git push origin BRANCH_NAME
119+
120+
You can now advertise your patch on the `dev mailing-list`_. The email must
121+
follow the following conventions:
122+
123+
* Subject must start with `[PATCH]`, followed by a short summary of the
124+
patch (with a reference to the ticket if it's a bug fix - `#XXX`);
125+
126+
* The body must contain the information about your branch
127+
(`git://github.com/USERNAME/symfony.git BRANCH_NAME`);
128+
129+
* The body must then describe what the patch does (reference a ticket, or
130+
copy and paste the commit message).
131+
132+
Based on the feedback, you might need to rework your patch. Before
133+
re-submitting the patch, rebase with master, don't merge; and force the push
134+
to the origin:
135+
136+
.. code-block:: bash
137+
138+
$ git push -f origin BRANCH_NAME
139+
140+
.. _ProGit: http://progit.org/
141+
.. _Github: https://github.com/signup/free
142+
.. _Symfony2 repository: http://www.github.com/fabpot/symfony
143+
.. _dev mailing-list: http://groups.google.com/group/symfony-devs

pt_BR/contributing/code/security.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Reporting a Security Issue
2+
==========================
3+
4+
Found a security issue in Symfony? Don't use the mailing-list or the bug
5+
tracker. All security issues must be sent to **security [at]
6+
symfony-project.com** instead. Emails sent to this address are forwarded to
7+
the Symfony core-team private mailing-list.
8+
9+
For each report, we first try to confirm the vulnerability. When it is
10+
confirmed, the core-team works on a solution following these steps:
11+
12+
1. Send an acknowledgement to the reporter;
13+
2. Work on a patch;
14+
3. Write a post describing the vulnerability, the possible exploits, and how
15+
to patch/upgrade affected applications;
16+
4. Apply the patch to all maintained versions of Symfony;
17+
5. Publish the post on the official Symfony blog.
18+
19+
.. note::
20+
While we are working on a patch, please do not reveal the issue publicly.

pt_BR/contributing/code/standards.rst

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
Coding Standards
2+
================
3+
4+
When contributing code to Symfony, you must follow its coding standards. To
5+
make a long story short, here is the golden rule: *Imitate the existing
6+
Symfony code*.
7+
8+
Structure
9+
---------
10+
11+
* Never use short tags (`<?`);
12+
13+
* Don't end class files with the usual `?>` closing tag;
14+
15+
* Indentation is done by steps of four spaces (tabs are never allowed);
16+
17+
* Use the linefeed character (`0x0A`) to end lines;
18+
19+
* Add a single space after each comma delimiter;
20+
21+
* Don't put spaces after an opening parenthesis and before a closing one;
22+
23+
* Add a single space around operators (`==`, `&&`, ...);
24+
25+
* Add a single space before the opening parenthesis of a control keyword
26+
(`if`, `else`, `for`, `while`, ...);
27+
28+
* Add a blank line before `return` statements;
29+
30+
* Don't add trailing spaces at the end of lines;
31+
32+
* Use braces to indicate control structure body regardless of the number of
33+
statements it contains;
34+
35+
* Put braces on their own line for classes, methods, and functions
36+
declaration;
37+
38+
* Separate the conditional statement and the opening brace with a single
39+
space and no blank line;
40+
41+
* Declare visibility explicitly for class, methods, and properties (usage of
42+
`var` is prohibited);
43+
44+
* Use lowercase PHP native typed constants: `false`, `true`, and `null`. The
45+
same goes for `array()`;
46+
47+
* Use uppercase strings for constants with words separated with underscores;
48+
49+
* Define one class per file;
50+
51+
* Declare class properties before methods;
52+
53+
* Declare public methods first, then protected ones and finally private ones.
54+
55+
Naming Conventions
56+
------------------
57+
58+
* Use camelCase, not underscores, for variable, function and method
59+
names;
60+
61+
* Use underscores for option, argument, parameter names;
62+
63+
* Use namespaces for all classes;
64+
65+
* Use `Symfony` as the first namespace level;
66+
67+
* Suffix interfaces with `Interface`;
68+
69+
* Use alphanumeric characters and underscores for file names;
70+
71+
Documentation
72+
-------------
73+
74+
* Add PHPDoc blocks for all classes, methods, and functions;
75+
76+
* The `@package` and `@subpackage` annotations are not used.

0 commit comments

Comments
 (0)