Skip to content

Commit

Permalink
Merge branch 'release/4.0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Feb 11, 2020
2 parents 647f14b + aef38a6 commit 6353073
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v4.0.3
## 02/11/2020

1. [](#new)
* Pass phpstan level 1 tests

# v4.0.2
## 02/03/2020

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Form
version: 4.0.2
version: 4.0.3
testing: false
description: Enables the forms handling
icon: check-square
Expand Down
13 changes: 7 additions & 6 deletions classes/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
* @property-read Data $data
* @property-read array $files
* @property-read Data $value
* @property-read array $errors
* @property array $errors
* @property array $upload_errors
* @property-read array $fields
* @property-read Blueprint $blueprint
* @property-read PageInterface $page
Expand Down Expand Up @@ -860,7 +861,7 @@ public function post()

/**
* @return string
* @deprecated 3.0 Use $this->getName() instead
* @deprecated 3.0 Use $form->getName() instead
*/
public function name(): string
{
Expand All @@ -869,7 +870,7 @@ public function name(): string

/**
* @return array
* @deprecated 3.0 Use $this->getFields() instead
* @deprecated 3.0 Use $form->getFields() instead
*/
public function fields(): array
{
Expand All @@ -878,7 +879,7 @@ public function fields(): array

/**
* @return PageInterface
* @deprecated 3.0 Use $this->getPage() instead
* @deprecated 3.0 Use $form->getPage() instead
*/
public function page(): PageInterface
{
Expand All @@ -888,7 +889,7 @@ public function page(): PageInterface
/**
* Backwards compatibility
*
* @deprecated 3.0
* @deprecated 3.0 Calling $form->filter() is not needed anymore (does nothing)
*/
public function filter(): void
{
Expand Down Expand Up @@ -1001,7 +1002,7 @@ public function legacyUploads()

public function getPagePathFromToken($path)
{
return Utils::getPagePathFromToken($path, $this->page());
return Utils::getPagePathFromToken($path, $this->getPage());
}

/**
Expand Down
2 changes: 1 addition & 1 deletion form.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function autoload()
public function onPluginsInitialized()
{
// Backwards compatibility for plugins that use forms.
class_alias(Form::class, \Grav\Plugin\Form::class);
class_alias(Form::class, 'Grav\Plugin\Form');

$this->grav['forms'] = function () {
$forms = new Forms();
Expand Down
4 changes: 2 additions & 2 deletions vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public function isClassMapAuthoritative()
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
}

/**
Expand Down Expand Up @@ -377,7 +377,7 @@ private function findFileWithExtension($class, $ext)
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
$search = $subPath.'\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
Expand Down

0 comments on commit 6353073

Please sign in to comment.