Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/browser-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ jobs:
test-suite: "--mode=standard --profile=browser --suite=admin-ui-full --tags='~@broken&&~@IbexaDXP'"
multirepository: true
timeout: 40
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
secrets: inherit
examples:
name: "BehatBundle examples"
uses: ibexa/gh-workflows/.github/workflows/browser-tests.yml@main
with:
project-edition: 'oss'
test-suite: '--mode=standard --profile=service --suite=examples'
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
secrets: inherit
6 changes: 6 additions & 0 deletions behat_ibexa_commerce.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ regression:
- '%paths.base%/vendor/ibexa/discounts/features/setup/setup.feature'
- '%paths.base%/vendor/ibexa/discounts-codes/features/setup/setup.feature'
- '%paths.base%/vendor/ibexa/activity-log/features/setup/setup.feature'
- '%paths.base%/vendor/ibexa/behat/features/setup/userSettings/help_center.feature'
contexts:
- Ibexa\Behat\API\Context\ContentContext
- Ibexa\Behat\API\Context\ContentTypeContext
Expand All @@ -35,6 +36,11 @@ regression:
- Ibexa\Behat\Core\Context\FileContext
- Ibexa\Migration\Behat\Context\MigrationContext
- Ibexa\ProductCatalog\Behat\Context\CatalogsContext
- Ibexa\AdminUi\Behat\BrowserContext\UserPreferencesContext
- Ibexa\AdminUi\Behat\BrowserContext\NavigationContext
- Ibexa\Behat\Browser\Context\AuthenticationContext
- Ibexa\AdminUi\Behat\BrowserContext\ContentActionsMenuContext
- Ibexa\AdminUi\Behat\BrowserContext\NotificationContext
commerce:
paths:
- '%paths.base%/vendor/ibexa/admin-ui/features/personas'
Expand Down
6 changes: 6 additions & 0 deletions behat_ibexa_experience.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ regression:
- '%paths.base%/vendor/ibexa/dashboard/features/setup/setup.feature'
- '%paths.base%/vendor/ibexa/connector-openai/features/setup/setup.feature'
- '%paths.base%/vendor/ibexa/activity-log/features/setup/setup.feature'
- '%paths.base%/vendor/ibexa/behat/features/setup/userSettings/help_center.feature'
contexts:
- Ibexa\Behat\API\Context\ContentContext
- Ibexa\Behat\API\Context\ContentTypeContext
Expand All @@ -38,6 +39,11 @@ regression:
- Ibexa\Behat\Core\Context\ConfigurationContext
- Ibexa\Behat\Core\Context\FileContext
- Ibexa\Migration\Behat\Context\MigrationContext
- Ibexa\AdminUi\Behat\BrowserContext\UserPreferencesContext
- Ibexa\AdminUi\Behat\BrowserContext\NavigationContext
- Ibexa\Behat\Browser\Context\AuthenticationContext
- Ibexa\AdminUi\Behat\BrowserContext\ContentActionsMenuContext
- Ibexa\AdminUi\Behat\BrowserContext\NotificationContext
experience:
paths:
- '%paths.base%/vendor/ibexa/admin-ui/features/personas'
Expand Down
6 changes: 6 additions & 0 deletions behat_ibexa_headless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ regression:
- '%paths.base%/vendor/ibexa/behat/features/setup/contentTranslation'
- '%paths.base%/vendor/ibexa/product-catalog/features/setup/setup.feature'
- '%paths.base%/vendor/ibexa/connector-openai/features/setup/setup.feature'
- '%paths.base%/vendor/ibexa/behat/features/setup/userSettings/help_center.feature'
contexts:
- Ibexa\Behat\API\Context\ContentContext
- Ibexa\Behat\API\Context\ContentTypeContext
Expand All @@ -28,6 +29,11 @@ regression:
- Ibexa\Behat\Core\Context\FileContext
- Ibexa\Behat\API\Context\LanguageContext
- Ibexa\Migration\Behat\Context\MigrationContext
- Ibexa\AdminUi\Behat\BrowserContext\UserPreferencesContext
- Ibexa\AdminUi\Behat\BrowserContext\NavigationContext
- Ibexa\Behat\Browser\Context\AuthenticationContext
- Ibexa\AdminUi\Behat\BrowserContext\ContentActionsMenuContext
- Ibexa\AdminUi\Behat\BrowserContext\NotificationContext
headless:
paths:
- '%paths.base%/vendor/ibexa/admin-ui/features/personas'
Expand Down
9 changes: 9 additions & 0 deletions behat_suites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,12 @@ setup:
- Ibexa\Behat\Core\Context\ConfigurationContext
- Ibexa\Behat\API\Context\LanguageContext
- Ibexa\Behat\API\Context\TestContext
user-settings:
paths:
- '%paths.base%/vendor/ibexa/behat/features/setup/userSettings'
contexts:
- Ibexa\AdminUi\Behat\BrowserContext\UserPreferencesContext
- Ibexa\AdminUi\Behat\BrowserContext\NavigationContext
- Ibexa\Behat\Browser\Context\AuthenticationContext
- Ibexa\AdminUi\Behat\BrowserContext\ContentActionsMenuContext
- Ibexa\AdminUi\Behat\BrowserContext\NotificationContext
11 changes: 11 additions & 0 deletions features/setup/userSettings/help_center.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Feature: Disable Help center in user settings

@admin @setup @helpCenter @javascript
Scenario: Disable Help center in user settings
Given I open Login page in admin SiteAccess
When I log in as admin with password publish
And I'm on Content view Page for root
And I go to user settings
When I disable Help center
And I perform the "Save and close" action
Then success notification that "User settings 'browsing' updated." appears
72 changes: 0 additions & 72 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -1350,12 +1350,6 @@ parameters:
count: 1
path: src/lib/API/Facade/UserFacade.php

-
message: '#^Call to function array_key_exists\(\) with ''function'' and array\{function\: string, line\?\: int, file\?\: string, class\?\: class\-string, type\?\: ''\-\>''\|''\:\:'', args\?\: array\<mixed\>, object\?\: object\} will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: src/lib/Browser/Assert/Debug/Interactive/CollectionAssert.php

-
message: '#^Invalid type Exception\|null to throw\.$#'
identifier: throw.notThrowable
Expand Down Expand Up @@ -1386,12 +1380,6 @@ parameters:
count: 1
path: src/lib/Browser/Assert/Debug/Interactive/CollectionAssert.php

-
message: '#^Offset ''file'' might not exist on array\{function\: ''eval'', line\?\: int, file\?\: string, class\?\: class\-string, type\?\: ''\-\>''\|''\:\:'', args\?\: array\<mixed\>, object\?\: object\}\.$#'
identifier: offsetAccess.notFound
count: 1
path: src/lib/Browser/Assert/Debug/Interactive/CollectionAssert.php

-
message: '#^PHPDoc tag @var above a method has no effect\.$#'
identifier: varTag.misplaced
Expand All @@ -1410,12 +1398,6 @@ parameters:
count: 2
path: src/lib/Browser/Assert/Debug/Interactive/CollectionAssert.php

-
message: '#^Call to function array_key_exists\(\) with ''function'' and array\{function\: string, line\?\: int, file\?\: string, class\?\: class\-string, type\?\: ''\-\>''\|''\:\:'', args\?\: array\<mixed\>, object\?\: object\} will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: src/lib/Browser/Assert/Debug/Interactive/ElementAssert.php

-
message: '#^Call to method hasClass\(\) on an unknown class Ibexa\\Behat\\Browseer\\Assert\\ElementAssertInterface\.$#'
identifier: class.notFound
Expand Down Expand Up @@ -1470,12 +1452,6 @@ parameters:
count: 1
path: src/lib/Browser/Assert/Debug/Interactive/ElementAssert.php

-
message: '#^Offset ''file'' might not exist on array\{function\: ''eval'', line\?\: int, file\?\: string, class\?\: class\-string, type\?\: ''\-\>''\|''\:\:'', args\?\: array\<mixed\>, object\?\: object\}\.$#'
identifier: offsetAccess.notFound
count: 1
path: src/lib/Browser/Assert/Debug/Interactive/ElementAssert.php

-
message: '#^PHPDoc tag @var above a method has no effect\.$#'
identifier: varTag.misplaced
Expand Down Expand Up @@ -1782,12 +1758,6 @@ parameters:
count: 1
path: src/lib/Browser/Element/Debug/Highlighting/RootElement.php

-
message: '#^Call to function array_key_exists\(\) with ''function'' and array\{function\: string, line\?\: int, file\?\: string, class\?\: class\-string, type\?\: ''\-\>''\|''\:\:'', args\?\: array\<mixed\>, object\?\: object\} will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: src/lib/Browser/Element/Debug/Interactive/BaseElement.php

-
message: '#^Invalid type Exception\|null to throw\.$#'
identifier: throw.notThrowable
Expand Down Expand Up @@ -1818,12 +1788,6 @@ parameters:
count: 1
path: src/lib/Browser/Element/Debug/Interactive/BaseElement.php

-
message: '#^Offset ''file'' might not exist on array\{function\: ''eval'', line\?\: int, file\?\: string, class\?\: class\-string, type\?\: ''\-\>''\|''\:\:'', args\?\: array\<mixed\>, object\?\: object\}\.$#'
identifier: offsetAccess.notFound
count: 1
path: src/lib/Browser/Element/Debug/Interactive/BaseElement.php

-
message: '#^PHPDoc tag @var above a method has no effect\.$#'
identifier: varTag.misplaced
Expand Down Expand Up @@ -1950,12 +1914,6 @@ parameters:
count: 1
path: src/lib/Browser/Element/Debug/Interactive/Element.php

-
message: '#^Call to function array_key_exists\(\) with ''function'' and array\{function\: string, line\?\: int, file\?\: string, class\?\: class\-string, type\?\: ''\-\>''\|''\:\:'', args\?\: array\<mixed\>, object\?\: object\} will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: src/lib/Browser/Element/Debug/Interactive/Element.php

-
message: '#^Invalid type Exception\|null to throw\.$#'
identifier: throw.notThrowable
Expand Down Expand Up @@ -2004,12 +1962,6 @@ parameters:
count: 1
path: src/lib/Browser/Element/Debug/Interactive/Element.php

-
message: '#^Offset ''file'' might not exist on array\{function\: ''eval'', line\?\: int, file\?\: string, class\?\: class\-string, type\?\: ''\-\>''\|''\:\:'', args\?\: array\<mixed\>, object\?\: object\}\.$#'
identifier: offsetAccess.notFound
count: 1
path: src/lib/Browser/Element/Debug/Interactive/Element.php

-
message: '#^PHPDoc tag @var above a method has no effect\.$#'
identifier: varTag.misplaced
Expand All @@ -2028,12 +1980,6 @@ parameters:
count: 2
path: src/lib/Browser/Element/Debug/Interactive/Element.php

-
message: '#^Call to function array_key_exists\(\) with ''function'' and array\{function\: string, line\?\: int, file\?\: string, class\?\: class\-string, type\?\: ''\-\>''\|''\:\:'', args\?\: array\<mixed\>, object\?\: object\} will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: src/lib/Browser/Element/Debug/Interactive/ElementCollection.php

-
message: '#^Invalid type Exception\|null to throw\.$#'
identifier: throw.notThrowable
Expand Down Expand Up @@ -2064,12 +2010,6 @@ parameters:
count: 1
path: src/lib/Browser/Element/Debug/Interactive/ElementCollection.php

-
message: '#^Offset ''file'' might not exist on array\{function\: ''eval'', line\?\: int, file\?\: string, class\?\: class\-string, type\?\: ''\-\>''\|''\:\:'', args\?\: array\<mixed\>, object\?\: object\}\.$#'
identifier: offsetAccess.notFound
count: 1
path: src/lib/Browser/Element/Debug/Interactive/ElementCollection.php

-
message: '#^PHPDoc tag @var above a method has no effect\.$#'
identifier: varTag.misplaced
Expand Down Expand Up @@ -2106,12 +2046,6 @@ parameters:
count: 1
path: src/lib/Browser/Element/Debug/Interactive/RootElement.php

-
message: '#^Call to function array_key_exists\(\) with ''function'' and array\{function\: string, line\?\: int, file\?\: string, class\?\: class\-string, type\?\: ''\-\>''\|''\:\:'', args\?\: array\<mixed\>, object\?\: object\} will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: src/lib/Browser/Element/Debug/Interactive/RootElement.php

-
message: '#^Invalid type Exception\|null to throw\.$#'
identifier: throw.notThrowable
Expand Down Expand Up @@ -2142,12 +2076,6 @@ parameters:
count: 1
path: src/lib/Browser/Element/Debug/Interactive/RootElement.php

-
message: '#^Offset ''file'' might not exist on array\{function\: ''eval'', line\?\: int, file\?\: string, class\?\: class\-string, type\?\: ''\-\>''\|''\:\:'', args\?\: array\<mixed\>, object\?\: object\}\.$#'
identifier: offsetAccess.notFound
count: 1
path: src/lib/Browser/Element/Debug/Interactive/RootElement.php

-
message: '#^PHPDoc tag @var above a method has no effect\.$#'
identifier: varTag.misplaced
Expand Down
9 changes: 5 additions & 4 deletions src/lib/Core/Debug/InteractiveDebuggerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,8 @@ private function getCallingComponent(): Component
{
$trace = debug_backtrace();
foreach ($trace as $traceLine) {
if (!array_key_exists('function', $traceLine) ||
$traceLine['function'] === 'eval' ||
!array_key_exists('object', $traceLine)
if ($traceLine['function'] === 'eval' ||
!array_key_exists('object', $traceLine)
) {
continue;
}
Expand All @@ -106,7 +105,9 @@ private function isRunningInteractive(): bool
$trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 5);

foreach ($trace as $traceEntry) {
if ($traceEntry['function'] === 'eval' && strpos($traceEntry['file'], 'psy/psysh') !== 0) {
if ($traceEntry['function'] === 'eval' &&
array_key_exists('file', $traceEntry) &&
strpos($traceEntry['file'], 'psy/psysh') !== 0) {
return true;
}
}
Expand Down
Loading