This repository has been archived by the owner on Jul 28, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
64 changed files
with
17,326 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,92 @@ | ||
Sonata respects the symfony’s conventions about contributing to the code. So before going further please review the [contributing documentation of Symfony](http://symfony.com/doc/current/contributing/code/patches.html#make-a-pull-request). | ||
Sonata Standard Edition | ||
======================= | ||
|
||
## Reporting bugs | ||
What's inside? | ||
-------------- | ||
|
||
If you happen to find a bug, we kindly request you to report it. However, before submitting it, please: | ||
Sonata Standard Edition comes pre-configured with the following bundles: | ||
|
||
* Check the [project documentation available online](https://sonata-project.org/bundles/) | ||
* Bundles from Symfony Standard distribution | ||
* Sonata Admin Bundles: Admin and Doctrine ORM Admin | ||
* Sonata Ecommerce Bundles: Payment, Customer, Invoice, Order and Product | ||
* Sonata Foundation Bundles: Notification, Formatter, Intl, Cache, Seo and Easy Extends | ||
* Sonata Feature Bundles: Page, Media, News, User, Block, Timeline | ||
* Api Bundles: FOSRestBundle, BazingaHateoasBundle, NelmioApiDocBundle and JMSSerializerBundle | ||
|
||
Then, if it appears that it’s a real bug, you may report it using Github by following these 3 points: | ||
Installation | ||
------------ | ||
|
||
* Check if the bug is not already reported! | ||
* A clear title to resume the issue | ||
* A description of the workflow needed to reproduce the bug, | ||
### Download sandbox files by one of possible examples | ||
|
||
> _NOTE:_ Don’t hesitate giving as much information as you can (OS, PHP version extensions …) | ||
Curl: | ||
|
||
## Sending a Pull Request | ||
curl -L github https://github.com/sonata-project/sandbox-build/archive/master.tar.gz | tar xzv | ||
cd sandbox | ||
|
||
When you send a PR, just make sure that: | ||
Git: | ||
|
||
* You add valid test cases. | ||
* Tests are green. | ||
* The related documentation is up-to-date. | ||
* Also don't forget to add a comment when you update a PR with a ping to the maintainer (``@username``), so he/she will get a notification. | ||
git clone https://github.com/sonata-project/sandbox.git | ||
cd sandbox | ||
git checkout master | ||
|
||
### Prepare configuration | ||
|
||
## Contributing to the documentation | ||
* Copy configuration file: ``cp .env .env.local`` | ||
* Edit ``.env.local`` to configure own environment | ||
|
||
You need to install the python tool to check and validate the sphinx syntax: | ||
### Load fixtures data | ||
|
||
pip install -r Resources/doc/requirements.txt | ||
vendor/bin/phing | ||
|
||
* You should be ready to go ... | ||
|
||
and you can check the documentation with the command: | ||
Vagrant Installation | ||
-------------------- | ||
|
||
cd Resources/doc/ | ||
rm -rf _build && sphinx-build -W -b html -d _build/doctrees . _build/html | ||
* vagrant up --provision --provider=virtualbox (Vagrant is going to get the environnement, install it for you and load sonata sample data) | ||
* Configure your host ``sudo nano /etc/hosts`` and add this line ``192.168.33.99 sonata.local`` | ||
* Open your browser [here][link_sonata] | ||
|
||
The html will be available in the ``_build/html`` folder. | ||
|
||
Run | ||
--- | ||
|
||
If you are running PHP 7.2 or above, you can use symfony to start the demo: | ||
|
||
symfony server:start --port=9090 | ||
|
||
Now open your browser and go to http://localhost:9090/ | ||
|
||
Tests | ||
----- | ||
|
||
### Functional testing | ||
|
||
To run the Behat tests, copy the default configuration file and adjust the base_url to your needs | ||
|
||
* Copy configuration file: ``cp behat.yml.dist behat.yml`` | ||
* Edit it ``behat.yml`` | ||
|
||
You can now run the tests suite by using the following command: | ||
|
||
bin/qa_behat.sh | ||
|
||
To get more informations about Behat, feel free to check [the official documentation][link_behat]. | ||
|
||
|
||
### Unit testing | ||
|
||
To run the sandbox test suites, you can run the command: | ||
|
||
vendor/bin/simple-phpunit | ||
|
||
You can also run the whole sonata-project bundles test suites by using the following command: | ||
|
||
bin/qa_client_ci.sh | ||
|
||
Enjoy! | ||
|
||
[link_behat]: http://docs.behat.org "the official Behat documentation" | ||
[link_vagrant]: http://www.vagrantup.com/downloads.html "Download Vagrant" | ||
[link_virtualbox]: https://www.virtualbox.org/wiki/Downloads "Download VirtualBox" | ||
[link_sonata]: http://sonata.local "Sonata" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Contributing webpack encore | ||
=========================== | ||
|
||
### webpack configuration | ||
|
||
You can find configuration for each build under `builds_configs` directory. This structure will allow use diffrence | ||
configuration for each layouts. | ||
|
||
``` | ||
cd ./builds_configs/sonata_admin_adminlte2 | ||
yarn install // to install node_modules | ||
yarn encore dev // to generate files under `public/build/sonata_admin | ||
``` | ||
|
||
### templates and css frameworks | ||
|
||
Symfony allow override templates by using templates ([see more][link_symfony_templates]). Use it for testing your change. | ||
Before create PR move this file to used framework, for example `templates/bootstrap3`. You can also add other css frameworks | ||
and templates for them. | ||
|
||
### Links: | ||
|
||
- [webpack encore dev-kit issue][link_issue] | ||
- [symfony webpack guide][link_symfony_webpack] | ||
|
||
|
||
[link_issue]: https://github.com/sonata-project/dev-kit/issues/779 "webpack encore dev-kit issue" | ||
[link_symfony_webpack]: https://symfony.com/doc/current/frontend.html#webpack-encore "symfony webpack encore" | ||
[link_symfony_templates]: https://symfony.com/doc/current/bundles/override.html "symfony override templates" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
body { | ||
background-color: lightgray; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Welcome to your app's main JavaScript file! | ||
* | ||
* We recommend including the built version of this JavaScript file | ||
* (and its CSS file) in your base layout (base.html.twig). | ||
*/ | ||
|
||
// any CSS you import will output into a single css file (app.css in this case) | ||
import '../css/app.css'; | ||
|
||
// Need jQuery? Install it with "yarn add jquery", then uncomment to import it. | ||
// import $ from 'jquery'; | ||
|
||
console.log('Hello Webpack Encore! Edit me in assets/js/app.js'); |
Oops, something went wrong.