Skip to content

Commit

Permalink
Merge pull request #1 from craftcms/develop
Browse files Browse the repository at this point in the history
update
  • Loading branch information
markhuot authored Sep 8, 2017
2 parents 1e788ee + e392d17 commit 5a849a3
Show file tree
Hide file tree
Showing 78 changed files with 892 additions and 383 deletions.
69 changes: 67 additions & 2 deletions CHANGELOG-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,69 @@ Craft CMS 3.0 Working Changelog

## Unreleased

### Added
- Added `craft\helpers\StringHelper::split()`.

### Changed
- Plugin translation sources are now configured with `forceTranslations` enabled.
- Checkbox and radio groups now have `div.checkbox-group` and `div.radio-group` container elements. ([#1965](https://github.com/craftcms/cms/pull/1965))
- Performance improvement to `craft\services\Images::getSupportImageFormats()` if you have Imagick installed. ([#1969](https://github.com/craftcms/cms/pull/1969))
- Performance improvement to `craft\helpers\Image::canManipulateAsImage()`. ([#1969](https://github.com/craftcms/cms/pull/1969))
- Queue info requests in the Control Panel no longer extend the user session.

### Deprecated
- Splitting a string on commas via `craft\helpers\ArrayHelper::toArray()` is now deprecated. Use `craft\helpers\StringHelper::split()` instead.

### Fixed
- Fixed a SQL error that could occur when using the `relatedTo` element query param. ([#1939](https://github.com/craftcms/cms/issues/1939))
- Fixed a bug where the “Parent” field was showing up on Edit Entry pages in Structure sections that were limited to a single level. ([#1940](https://github.com/craftcms/cms/pull/1940))
- Fixed a bug where the “Delete Stale Template Cache” task would fail when saving an existing Single section.
- Fixed a bug where it was not possible to use `:notempty:` with PostgreSQL.
- Fixed a bug where the `job` column in the `queue` table wasn’t large enough to store some job data. ([#1948](https://github.com/craftcms/cms/issues/1948))
- Fixed a JS error that occurred on CP templates that extended `_layouts/cp` but overrode the `body` block to remove the sidebar, if there were any running/waiting jobs in the queue. ([#1950](https://github.com/craftcms/cms/issues/1950))
- Updated some outdated references to `runPendingTasks()` in the CP JavaScript files, which resulted in JS errors. ([#1951](https://github.com/craftcms/cms/issues/1951))
- Fixed a bug where the “Translation Method” setting was visible for existing Matrix sub-fields even when there was only one available translation method (e.g. Entries fields). ([#1967](https://github.com/craftcms/cms/issues/1967))
- Fixed a bug where Craft would get confused whether or not it could manipulate SVG files. ([#1874](https://github.com/craftcms/cms/issues/1874))
- Fixed a CSRF validation error that would occur when attempting to re-login via the login modal in the Control Panel. ([#1957](https://github.com/craftcms/cms/issues/1957))
- Fixed a “divide by zero” error when paginating an empty set of elements. ([#1970](https://github.com/craftcms/cms/pull/1970))

## 3.0.0-beta.26 - 2017-08-22

### Fixed
- Fixed a SQL error that could occur when logging deprecation errors if the line number is unknown. ([#1927](https://github.com/craftcms/cms/issues/1927))
- Fixed a deprecation error that occurred when using a Tags field. ([#1932](https://github.com/craftcms/cms/issues/1932))
- Fixed a PHP error that occurred if a volume type class was missing. ([#1934](https://github.com/craftcms/cms/issues/1934))
- Fixed a PHP error that occurred when saving a new entry in a section with versioning enabled. ([#1935](https://github.com/craftcms/cms/issues/1935))

## 3.0.0-beta.25 - 2017-08-17

### Added
- Added `craft\elements\Entry::$revisionCreatorId`.
- Added `craft\services\EntryRevisions::doesEntryHaveVersions()`.

### Changed
- Craft now retroactively creates entry versions when saving entries, for entries that didn’t have any version history yet. ([#1926](https://github.com/craftcms/cms/issues/1926))

### Fixed
- Fixed an error that occurred when chaining a custom field method and a normal query method (e.g. `all()`) together on an element query. ([#1887](https://github.com/craftcms/cms/issues/1887))
- Fixed a PHP error that occurred when processing a user verification request.
- Fixed a bug where newly-created `div.matrixblock` elements weren’t getting a `data-type` attribute like existing blocks had. ([#1925](https://github.com/craftcms/cms/pull/1925))
- Fixed a bug where you would get a SQL error if you tried to push a job to the queue using PostgreSQL.
- Fixed a bug that would trigger the browser’s JavaScript debugger if you saved a Matrix field that had collapsed blocks.
- Fixed a bug where `craft\helpers\ChartHelper::getRunChartDataFromQuery()` an SQL query instead of the actual results.
- Fixed a bug where `craft\controllers\BaseElementsController::context()` was expecting a`string ` return, while return could also be `null`.

## 3.0.0-beta.24 - 2017-08-15

### Added
- Craft’s tasks implementation has been replaced with a queue, based on the [Yii 2 Queue Extension](https://github.com/yiisoft/yii2-queue). ([#1910](https://github.com/craftcms/cms/issues/1910))
- The “Failed” message in the queue HUD in the Control Panel now shows the full error message as alt text. ([#855](https://github.com/craftcms/cms/issues/855))
- It’s now possible to install Craft from the command line, using the new `install` command. ([#1917](https://github.com/craftcms/cms/pull/1917))
- Added the `instance of()` Twig test.
- Added `craft\base\FlysystemVolume`, which replaces `craft\base\Volume` as the new base class for Flysystem-based volumes.
- Added `craft\behaviors\SessionBehavior`, making it possible for `config/app.php` to customize the base `session` component while retaining Craft’s custom session methods.
- Added `craft\controllers\QueueController`.
- Added `craft\events\UserEvent`.
- Added `craft\queue\BaseJob`, a base class for queue jobs that adds support for descriptions and progress.
- Added `craft\queue\Command`, which provides `queue/run`, `queue/listen`, and `queue/info` console commands.
- Added `craft\queue\InfoAction`.
Expand All @@ -27,14 +83,15 @@ Craft CMS 3.0 Working Changelog
### Changed
- Renamed the `runTasksAutomatically` config setting to `runQueueAutomatically`.
- Logs that occur during `queue` requests now get saved in `storage/logs/queue.log`.
- The updater now ensures it can find `composer.json` before putting the system in Maintenance Mode, reducing the liklihood that Craft will mistakingly think that it’s already mid-update later on. ([#1883](https://github.com/craftcms/cms/issues/1883))
- The updater now ensures that the `COMPOSER_HOME`, `HOME` (\*nix), or `APPDATA` (Windows) environment variable is set before putting the system in Maintenance Mode, reducing the liklihood that Craft will mistakingly think that it’s already mid-update later on. ([#1890](https://github.com/craftcms/cms/issues/1890#issuecomment-319715460))
- The updater now ensures it can find `composer.json` before putting the system in Maintenance Mode, reducing the likelihood that Craft will mistakingly think that it’s already mid-update later on. ([#1883](https://github.com/craftcms/cms/issues/1883))
- The updater now ensures that the `COMPOSER_HOME`, `HOME` (\*nix), or `APPDATA` (Windows) environment variable is set before putting the system in Maintenance Mode, reducing the likelihood that Craft will mistakingly think that it’s already mid-update later on. ([#1890](https://github.com/craftcms/cms/issues/1890#issuecomment-319715460))
- `craft\mail\Mailer::send()` now processes Twig code in the email message before parsing it as Markdown, if the message was composed via `craft\mail\Mailer::composeFromKey()`. ([#1895](https://github.com/craftcms/cms/pull/1895))
- `craft\mail\Mailer::send()` no longer catches exceptions thrown by its parent method, or fires a `sendMailFailure` event in the event of a send failure. ([#1896](https://github.com/craftcms/cms/issues/1896))
- Renamed `craft\helpers\Component::applySettings()` to `mergeSettings()`, and it no longer takes the `$config` argument by reference, instead returning a new array.
- Renamed `craft\web\twig\nodes\GetAttr` to `GetAttrNode`.
- `craft\base\Volume` is now only focussed on things that every volume would need, regardless of whether it will use Flysystem under the hood.
- `craft\base\VolumeInterface::createFileByStream()`, `updateFileByStream()`, `deleteFile()`, `renameFile()`, `copyFile()`, `createDir()`, `deleteDir()`, and `renameDir()` no longer require their implementation methods to return a boolean value.
- `div.matrixblock` elements in the Control Panel now have a `data-type` attribute set to the Matrix block type’s handle. ([#1915](https://github.com/craftcms/cms/pull/1915))

### Deprecated
- Looping through element queries directly is now deprecated. Use the `all()` function to fetch the query results before looping over them. ([#1902](https://github.com/craftcms/cms/issues/1902))
Expand All @@ -44,9 +101,15 @@ Craft CMS 3.0 Working Changelog
- Removed `craft\base\TaskInterface`.
- Removed `craft\base\TaskTrait`.
- Removed `craft\controllers\TasksController`.
- Removed `craft\controllers\VolumesController::actionLoadVolumeTypeData()`.
- Removed `craft\db\TaskQuery`.
- Removed `craft\events\MailFailureEvent`.
- Removed `craft\events\TaskEvent`.
- Removed `craft\events\UserActivateEvent`. Use `craft\events\UserEvent` instead.
- Removed `craft\events\UserSuspendEvent`. Use `craft\events\UserEvent` instead.
- Removed `craft\events\UserTokenEvent`. Use `craft\events\UserEvent` instead.
- Removed `craft\events\UserUnlockEvent`. Use `craft\events\UserEvent` instead.
- Removed `craft\events\UserUnsuspendEvent`. Use `craft\events\UserEvent` instead.
- Removed `craft\mail\Mailer::EVENT_SEND_MAIL_FAILURE`.
- Removed `craft\records\Task`.
- Removed `craft\services\Tasks`.
Expand All @@ -68,6 +131,8 @@ Craft CMS 3.0 Working Changelog
- Fixed a 404 error for `bootstrap.js` that occurred when the Debug Toolbar was opened.
- Fixed some deprecation errors caused by relational and Matrix field inputs.
- Fixed a bug where a plugin would get a PHP error if it tried to get the current site in the middle of a Craft update.
- Fixed a bug where the Migrations utility would display an error message even if the migrations were applied successfully. ([#1911](https://github.com/craftcms/cms/issues/1911))
- Fixed a PHP error that occurred if calling `getMimeType()` on an asset with an extension with an unknown MIME type. ([#1919](https://github.com/craftcms/cms/pull/1919))

## 3.0.0-beta.23 - 2017-07-28

Expand Down
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,29 @@ Craft CMS Changelog

## Unreleased

### Changed
- Added support for the `application/font-woff2` MIME type (`.woff2`). ([#1966](https://github.com/craftcms/cms/issues/1966))
- `div.matrixblock` elements in the Control Panel now have a `data-type` attribute set to the Matrix block type’s handle. ([#1915](https://github.com/craftcms/cms/pull/1915))

### Fixed
- Fixed a bug where you could get a PHP error uploading some JPG files on PHP 7.1.
- Fixed a bug where user photos and site logos/icons were not taking into account the [sanitizeSvgUploads](https://craftcms.com/docs/config-settings#sanitizeSvgUploads) config setting.
- Fixed a CSRF validation error that would occur when attempting to re-login via the login modal in the Control Panel.

### Security
- Fixed an XSS vulnerability.

## 2.6.2989 2017-08-15

### Added
- Added the [onLockUser](https://craftcms.com/docs/plugins/events-reference#users-onLockUser) event, which fires when a user account is locked.

### Fixed
- Fixed a bug where the PHP and DB versions the Craft Support widget passed to GitHub would not escape tildes (`~`), potentially having Markdown confuse them for strikethrough markup delimiters.
- Fixed a bug where it was possible for users to be redirected to a 404 in the Control Panel after logging in. ([#1901](https://github.com/craftcms/cms/issues/1901))
- Fixed a bug where users would get one extra login attempt than the [maxInvalidLogins](https://craftcms.com/docs/config-settings#maxInvalidLogins) config setting was set to.

## 2.6.2988 2017-07-28
## 2.6.2988 - 2017-07-28

### Changed
- Added `.m2t` to the default [allowedFileExtensions](https://craftcms.com/docs/config-settings#allowedFileExtensions) config setting value.
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "craftcms/cms",
"description": "Craft CMS",
"version": "3.0.0-beta.23",
"version": "3.0.0-beta.26",
"keywords": [
"cms",
"craftcms",
Expand All @@ -28,6 +28,7 @@
"league/flysystem": "~1.0.35",
"mikehaertl/php-shellcommand": "~1.2.5",
"pixelandtonic/imagine": "0.7.1.1",
"seld/cli-prompt": "^1.0",
"twig/twig": "~2.3.0",
"yiisoft/yii2": "~2.0.12.0",
"yiisoft/yii2-debug": "2.0.8",
Expand Down
2 changes: 1 addition & 1 deletion src/base/ApplicationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public function getIsInstalled(): bool
return false;
}

return $this->_isInstalled = (bool)($this->getRequest()->getIsConsoleRequest() || $this->getDb()->tableExists('{{%info}}', false));
return $this->_isInstalled = (bool)($this->getDb()->tableExists('{{%info}}', false));
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/base/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public function __construct($id, $parent = null, array $config = [])
'class' => PhpMessageSource::class,
'sourceLanguage' => $this->sourceLanguage,
'basePath' => $this->getBasePath().DIRECTORY_SEPARATOR.'translations',
'forceTranslation' => true,
'allowOverrides' => true,
];
}
Expand Down
2 changes: 1 addition & 1 deletion src/base/VolumeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface VolumeInterface extends SavableComponentInterface
/**
* Returns the URL to the source, if it’s accessible via HTTP traffic.
*
* @return string|null The root URL, or `false` if there isn’t one
* @return string|false The root URL, or `false` if there isn’t one
*/
public function getRootUrl();

Expand Down
2 changes: 1 addition & 1 deletion src/behaviors/ElementQueryBehavior.php.template
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ElementQueryBehavior extends ContentBehavior
{
if (isset(self::$fieldHandles[$name]) && count($params) === 1) {
$this->$name = $params[0];
return $this;
return $this->owner;
}
return parent::__call($name, $params);
}
Expand Down
6 changes: 3 additions & 3 deletions src/config/GeneralConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

namespace craft\config;

use craft\helpers\ArrayHelper;
use craft\helpers\ConfigHelper;
use craft\helpers\StringHelper;
use yii\base\InvalidConfigException;
use yii\base\Object;
use yii\base\UnknownPropertyException;
Expand Down Expand Up @@ -768,10 +768,10 @@ public function init()

// Merge extraAllowedFileExtensions into allowedFileExtensions
if (is_string($this->allowedFileExtensions)) {
$this->allowedFileExtensions = ArrayHelper::toArray($this->allowedFileExtensions);
$this->allowedFileExtensions = StringHelper::split($this->allowedFileExtensions);
}
if (is_string($this->extraAllowedFileExtensions)) {
$this->extraAllowedFileExtensions = ArrayHelper::toArray($this->extraAllowedFileExtensions);
$this->extraAllowedFileExtensions = StringHelper::split($this->extraAllowedFileExtensions);
}
if (is_array($this->extraAllowedFileExtensions)) {
$this->allowedFileExtensions = array_merge($this->allowedFileExtensions, $this->extraAllowedFileExtensions);
Expand Down
4 changes: 2 additions & 2 deletions src/config/app/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
return [
'id' => 'CraftCMS',
'name' => 'Craft CMS',
'version' => '3.0.0-beta.23',
'schemaVersion' => '3.0.55',
'version' => '3.0.0-beta.26',
'schemaVersion' => '3.0.59',
'minVersionRequired' => '2.6.2788',
'basePath' => dirname(__DIR__, 2), // Defines the @app alias
'runtimePath' => '@storage/runtime', // Defines the @runtime alias
Expand Down
6 changes: 6 additions & 0 deletions src/config/mimeTypes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

$mimeTypes = require Craft::getAlias('@yii/helpers/mimeTypes.php');
$mimeTypes['woff2'] = 'application/font-woff2';

return $mimeTypes;
Loading

0 comments on commit 5a849a3

Please sign in to comment.