Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into add-documentation-for-ColumnsEditorRecord-…
Browse files Browse the repository at this point in the history
…UI-component
  • Loading branch information
dobooth authored Feb 13, 2020
2 parents 935c5f7 + e6dbb4f commit 007daa0
Show file tree
Hide file tree
Showing 9 changed files with 326 additions and 172 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Markdown linting test

on:
pull_request:
branches:
- master
- 2.*-develop

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6
- name: Install mdl gem
run: gem install mdl -v '0.7.0'
- name: Run mdl
run: mdl --style=_checks/styles/style-rules-prod --ignore-front-matter --git-recurse -- .
12 changes: 6 additions & 6 deletions src/cloud/deploy/scenario-based-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ You add the scenarios for building and deploying Magento to the `hooks` section
hooks:
build: |
set -e
php ./vendor/bin/ece-tools run scenario/generate.xml
php ./vendor/bin/ece-tools run scenario/transfer.xml
php ./vendor/bin/ece-tools run scenario/build/generate.xml
php ./vendor/bin/ece-tools run scenario/build/transfer.xml
deploy: |
php ./vendor/bin/ece-tools run scenario/deploy.xml
post_deploy: |
Expand Down Expand Up @@ -105,8 +105,8 @@ To use the custom configuration file, update the default `.magento.app.yaml` fil
hooks:
build: |
set -e
php ./vendor/bin/ece-tools run scenario/generate.xml
php ./vendor/bin/ece-tools run scenario/transfer.xml
php ./vendor/bin/ece-tools run scenario/build/generate.xml
php ./vendor/bin/ece-tools run scenario/build/transfer.xml
deploy: |
php ./vendor/bin/ece-tools run scenario/deploy.xml vendor/vendor-name/module-name/deploy-custom-mode-config.xml
post_deploy: |
Expand Down Expand Up @@ -202,8 +202,8 @@ To use this script in your project, add the following configuration to the `.mag
hooks:
build: |
set -e
php ./vendor/bin/ece-tools run scenario/generate.xml
php ./vendor/bin/ece-tools run scenario/transfer.xml
php ./vendor/bin/ece-tools run scenario/build/generate.xml
php ./vendor/bin/ece-tools run scenario/build/transfer.xml
deploy: |
php ./vendor/bin/ece-tools run scenario/deploy.xml vendor/vendor-name/module-name/deploy-extended.xml
post_deploy: |
Expand Down
4 changes: 4 additions & 0 deletions src/cloud/release-notes/backward-incompatible-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ In earlier {{ site.data.var.ct }} releases, you could use the `m2-ece-build` and

- **Updating the Magento Cloud docker-compose commands**–We renamed the path to the command file from `./bin/docker` to `./bin/magento-docker`. Update your scripts and commands to use the new path.

- **Cron container no longer included in default Docker configuration**–Now, you must add the `--with-cron` option to the `ece-docker build:compose` command to include the Cron container in the Docker environment configuration. See [Manage cron jobs]({{site.baseurl}}/cloud/docker/docker-manage-cron-jobs.html).

Any scripts that previously generated containers with crons will now be lacking crons.

- **Using temporary containers**–In previous versions, the containers created by `bin/magento-docker` command operations were not removed, so you could use them for other operations. Now, the `magento-docker` commands remove any containers they create after the command completes.

If you want to keep a container created by a docker-compose operation, use the `docker-compose run` command instead of the `bin/magento-docker` command.
Expand Down
83 changes: 56 additions & 27 deletions src/guides/v2.3/coding-standards/docblock-standard-general.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,36 +441,65 @@ For example:
**Throwing Exception Implicitly:**

```php
/**
* Recursively delete directory from storage
*
* @param string $path Target dir
* @return void
* @throws Mage_Core_Exception when directories cannot be deleted
*/
public function deleteDirectory($path)
{
// prevent accidental root directory deleting
$rootCmp = rtrim($this->getHelper()->getStorageRoot(), DS);
$pathCmp = rtrim($path, DS);

if ($rootCmp == $pathCmp) {
Mage::throwException(Mage::helper('Mage_Cms_Helper_Data')->__('Cannot delete root directory %s.', $path));
}

$io = new Varien_Io_File();
/**
* Perform login process
*
* @param string $username
* @param string $password
* @return void
* @throws \Magento\Framework\Exception\AuthenticationException
*/
public function login($username, $password)
{
if (empty($username) || empty($password)) {
self::throwException(
__(
'The account sign-in was incorrect or your account is disabled temporarily. '
. 'Please wait and try again later.'
)
);
}

if (Mage::helper('Mage_Core_Helper_File_Storage_Database')->checkDbUsage()) {
Mage::getModel('Mage_Core_Model_File_Storage_Directory_Database')->deleteDirectory($path);
}
if (!$io->rmdir($path, true)) {
Mage::throwException(Mage::helper('Mage_Cms_Helper_Data')->__('Cannot delete directory %s.', $path));
}
try {
$this->_initCredentialStorage();
$this->getCredentialStorage()->login($username, $password);
if ($this->getCredentialStorage()->getId()) {
$this->getAuthStorage()->setUser($this->getCredentialStorage());
$this->getAuthStorage()->processLogin();

$this->_eventManager->dispatch(
'backend_auth_user_login_success',
['user' => $this->getCredentialStorage()]
);
}

if (strpos($pathCmp, $rootCmp) === 0) {
$io->rmdir($this->getThumbnailRoot() . DS . ltrim(substr($pathCmp, strlen($rootCmp)), '\\/'), true);
if (!$this->getAuthStorage()->getUser()) {
self::throwException(
__(
'The account sign-in was incorrect or your account is disabled temporarily. '
. 'Please wait and try again later.'
)
);
}
} catch (PluginAuthenticationException $e) {
$this->_eventManager->dispatch(
'backend_auth_user_login_failed',
['user_name' => $username, 'exception' => $e]
);
throw $e;
} catch (\Magento\Framework\Exception\LocalizedException $e) {
$this->_eventManager->dispatch(
'backend_auth_user_login_failed',
['user_name' => $username, 'exception' => $e]
);
self::throwException(
__(
$e->getMessage()? : 'The account sign-in was incorrect or your account is disabled temporarily. '
. 'Please wait and try again later.'
)
);
}
}
}
```

#### @return tag {#return}
Expand Down
28 changes: 28 additions & 0 deletions src/guides/v2.3/extension-dev-guide/build/composer-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,34 @@ We recommend you include `composer.json` in your component's root directory even
{:.bs-callout-info}
Magento does not support the [`path`][3] repository.

## composer.json

Here is the example of composer.json file.

{% collapsible File content for composer.json %}
```json
{
"name": "mycompany/sample-module-minimal",
"description": "A module that creates a page in the Magento admin area",
"type": "magento2-module",
"version": "1.0.0",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"require": {
"php": "~7.1.3||~7.2.0||~7.3.0"
},
"autoload": {
"files": [ "registration.php" ],
"psr-4": {
"MyCompany\\ExampleAdminNewPage\\": ""
}
}
}
```
{% endcollapsible %}

## Composer binary location {#composer-binary}

Magento uses the composer binary in the `<Magento root>/vendor/composer` directory instead of a globally installed [composer](https://glossary.magento.com/composer).
Expand Down
Loading

0 comments on commit 007daa0

Please sign in to comment.