diff --git a/.github/.htaccess b/.github/.htaccess new file mode 100644 index 0000000000000..93169e4eb44ff --- /dev/null +++ b/.github/.htaccess @@ -0,0 +1,2 @@ +Order deny,allow +Deny from all diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000000..4e82725a7fb08 --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at engcom@magento.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 92% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md index 0634653275a9a..2839ac5ee9d32 100644 --- a/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -29,3 +29,8 @@ If you are a new GitHub user, we recommend that you create your own [free github 3. Create and test your work. 4. Fork the Magento 2 repository according to [Fork a repository instructions](http://devdocs.magento.com/guides/v2.0/contributor-guide/contributing.html#fork) and when you are ready to send us a pull request – follow [Create a pull request instructions](http://devdocs.magento.com/guides/v2.0/contributor-guide/contributing.html#pull_request). 5. Once your contribution is received, Magento 2 development team will review the contribution and collaborate with you as needed to improve the quality of the contribution. + +## Code of Conduct + +Please note that this project is released with a Contributor Code of Conduct. We expect you to agree to its terms when participating in this project. +The full text is available in the repository [Wiki](https://github.com/magento/magento2/wiki/Magento-Code-of-Conduct). diff --git a/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md similarity index 100% rename from ISSUE_TEMPLATE.md rename to .github/ISSUE_TEMPLATE.md diff --git a/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from PULL_REQUEST_TEMPLATE.md rename to .github/PULL_REQUEST_TEMPLATE.md diff --git a/.gitignore b/.gitignore index 90c60dfa39cad..94c3bf76a2bd1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /.metadata /.project /.settings +/.vscode atlassian* /nbproject /robots.txt @@ -48,6 +49,7 @@ atlassian* /pub/media/favicon/* /pub/media/import/* !/pub/media/import/.htaccess +/pub/media/logo/* /pub/media/theme/* /pub/media/theme_customization/* !/pub/media/theme_customization/.htaccess @@ -65,3 +67,4 @@ atlassian* !/vendor/.htaccess /generated/* !/generated/.htaccess +.DS_Store diff --git a/.htaccess b/.htaccess index 90b9c16a5a8c0..3e6eb31938e46 100644 --- a/.htaccess +++ b/.htaccess @@ -234,10 +234,6 @@ order allow,deny deny from all - - order allow,deny - deny from all - order allow,deny deny from all diff --git a/.htaccess.sample b/.htaccess.sample index 3b61bb672ec8a..e70eb9d022412 100644 --- a/.htaccess.sample +++ b/.htaccess.sample @@ -210,10 +210,6 @@ order allow,deny deny from all - - order allow,deny - deny from all - order allow,deny deny from all diff --git a/.travis.yml b/.travis.yml index 1f997b4e00d11..7c300af70dc4e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ sudo: required dist: trusty +group: edge addons: apt: packages: @@ -7,21 +8,38 @@ addons: - mysql-client-core-5.6 - mysql-client-5.6 - postfix + firefox: "46.0" + hosts: + - magento2.travis language: php php: - 7.0 + - 7.1 env: global: - COMPOSER_BIN_DIR=~/bin - INTEGRATION_SETS=3 - NODE_JS_VERSION=6 + - MAGENTO_HOST_NAME="magento2.travis" matrix: - TEST_SUITE=unit + - TEST_SUITE=static + - TEST_SUITE=js GRUNT_COMMAND=spec + - TEST_SUITE=js GRUNT_COMMAND=static - TEST_SUITE=integration INTEGRATION_INDEX=1 - TEST_SUITE=integration INTEGRATION_INDEX=2 - TEST_SUITE=integration INTEGRATION_INDEX=3 - - TEST_SUITE=static - - TEST_SUITE=js + - TEST_SUITE=functional +matrix: + exclude: + - php: 7.0 + env: TEST_SUITE=static + - php: 7.0 + env: TEST_SUITE=js GRUNT_COMMAND=spec + - php: 7.0 + env: TEST_SUITE=js GRUNT_COMMAND=static + - php: 7.0 + env: TEST_SUITE=functional cache: apt: true directories: @@ -30,9 +48,14 @@ cache: - $HOME/node_modules - $HOME/yarn.lock before_install: ./dev/travis/before_install.sh -install: composer install --no-interaction --prefer-dist +install: composer install --no-interaction before_script: ./dev/travis/before_script.sh script: + # Set arguments for variants of phpunit based tests; '|| true' prevents failing script when leading test fails - test $TEST_SUITE = "static" && TEST_FILTER='--filter "Magento\\Test\\Php\\LiveCodeTest"' || true - - if [ $TEST_SUITE != "js" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi - - if [ $TEST_SUITE == "js" ]; then grunt spec; fi + - test $TEST_SUITE = "functional" && TEST_FILTER='dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests.php' || true + + # The scripts for grunt/phpunit type tests + - if [ $TEST_SUITE == "functional" ]; then dev/tests/functional/vendor/phpunit/phpunit/phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi + - if [ $TEST_SUITE != "functional" ] && [ $TEST_SUITE != "js" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi + - if [ $TEST_SUITE == "js" ]; then grunt $GRUNT_COMMAND; fi diff --git a/app/autoload.php b/app/autoload.php index b380bd52b1c38..54087d0255495 100644 --- a/app/autoload.php +++ b/app/autoload.php @@ -35,6 +35,3 @@ } AutoloaderRegistry::registerAutoloader(new ClassLoaderWrapper($composerAutoloader)); - -// Sets default autoload mappings, may be overridden in Bootstrap::create -\Magento\Framework\App\Bootstrap::populateAutoloader(BP, []); diff --git a/app/bootstrap.php b/app/bootstrap.php index a3d48bca147fe..6701a9f4dd51e 100644 --- a/app/bootstrap.php +++ b/app/bootstrap.php @@ -11,14 +11,14 @@ #ini_set('display_errors', 1); /* PHP version validation */ -if (!defined('PHP_VERSION_ID') || !(PHP_VERSION_ID >= 50605 && PHP_VERSION_ID < 50700 || PHP_VERSION_ID === 70002 || PHP_VERSION_ID === 70004 || PHP_VERSION_ID >= 70006)) { +if (!defined('PHP_VERSION_ID') || !(PHP_VERSION_ID === 70002 || PHP_VERSION_ID === 70004 || PHP_VERSION_ID >= 70006)) { if (PHP_SAPI == 'cli') { - echo 'Magento supports PHP 5.6.5, 7.0.2, 7.0.4, and 7.0.6 or later. ' . + echo 'Magento supports 7.0.2, 7.0.4, and 7.0.6 or later. ' . 'Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html'; } else { echo << -

Magento supports PHP 5.6.5, 7.0.2, 7.0.4, and 7.0.6 or later. Please read +

Magento supports PHP 7.0.2, 7.0.4, and 7.0.6 or later. Please read Magento System Requirements. @@ -28,6 +28,9 @@ } require_once __DIR__ . '/autoload.php'; +// Sets default autoload mappings, may be overridden in Bootstrap::create +\Magento\Framework\App\Bootstrap::populateAutoloader(BP, []); + require_once BP . '/app/functions.php'; /* Custom umask value may be provided in optional mage_umask file in root */ @@ -59,6 +62,6 @@ date_default_timezone_set('UTC'); -/* Adjustment of precision value for several versions of PHP */ -ini_set('precision', 17); -ini_set('serialize_precision', 17); +/* For data consistency between displaying (printing) and serialization a float number */ +ini_set('precision', 14); +ini_set('serialize_precision', 14); diff --git a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php index 7988bc736df14..6f0e42bdcbef1 100644 --- a/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php +++ b/app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php @@ -6,8 +6,6 @@ * See COPYING.txt for license details. */ -// @codingStandardsIgnoreFile - namespace Magento\AdminNotification\Block\Grid\Renderer; class Actions extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer @@ -39,9 +37,8 @@ public function __construct( */ public function render(\Magento\Framework\DataObject $row) { - $readDetailsHtml = $row->getUrl() ? '' . __( - 'Read Details' - ) . '' : ''; + $readDetailsHtml = $row->getUrl() ? '' . + __('Read Details') . '' : ''; $markAsReadHtml = !$row->getIsRead() ? 'configuration.","{{base_url}} is not recommended to use in a production environment to declare the Base Unsecure URL / Base Secure URL. We highly recommend changing this value in your Magento configuration." @@ -32,12 +32,11 @@ "We were unable to synchronize one or more media files. Please refer to the log file for details.","We were unable to synchronize one or more media files. Please refer to the log file for details." "Synchronization of media storages has been completed.","Synchronization of media storages has been completed." "Your web server is set up incorrectly and allows unauthorized access to sensitive files. Please contact your hosting provider.","Your web server is set up incorrectly and allows unauthorized access to sensitive files. Please contact your hosting provider." -"Close popup","Close popup" -"Close","Close" "System Messages:","System Messages:" "Critical System Messages","Critical System Messages" "Major System Messages","Major System Messages" "System messages","System messages" +Close,Close "See All (","See All (" " unread)"," unread)" "Show Toolbar","Show Toolbar" @@ -45,7 +44,7 @@ "Use HTTPS to Get Feed","Use HTTPS to Get Feed" "Update Frequency","Update Frequency" "Last Update","Last Update" -"Severity","Severity" +Severity,Severity "Date Added","Date Added" -"Message","Message" -"Actions","Actions" +Message,Message +Actions,Actions diff --git a/app/code/Magento/AdminNotification/registration.php b/app/code/Magento/AdminNotification/registration.php index b0e1c4ef1aa44..8d427a458c18d 100644 --- a/app/code/Magento/AdminNotification/registration.php +++ b/app/code/Magento/AdminNotification/registration.php @@ -4,8 +4,6 @@ * See COPYING.txt for license details. */ -\Magento\Framework\Component\ComponentRegistrar::register( - \Magento\Framework\Component\ComponentRegistrar::MODULE, - 'Magento_AdminNotification', - __DIR__ -); +use \Magento\Framework\Component\ComponentRegistrar; + +ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_AdminNotification', __DIR__); diff --git a/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml b/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml index c6b8bda208410..3f79e803ccca2 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml +++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml @@ -19,11 +19,11 @@ "autoOpen": true, "buttons": false, "modalClass": "modal-system-messages", - "title": "getHeaderText(); ?>" + "title": "getHeaderText() ?>" } }'>

  • - getNoticeMessageText(); ?>
    - getReadDetailsText(); ?> + getNoticeMessageText() ?>
    + getReadDetailsText() ?>
  • diff --git a/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml b/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml index 4e8be1fee7658..01d6fdcb29571 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml +++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml @@ -15,31 +15,31 @@
    - + getCriticalCount()): ?> getMajorCount()): ?>
    -
    +
    diff --git a/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml b/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml index 624f4d35fee1c..a97293547e132 100644 --- a/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml +++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml @@ -9,11 +9,11 @@ ?> -