diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 1b1671ecf..da1a5abaa 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -40,7 +40,7 @@ body: validations: required: false - type: textarea - id: enironment + id: environment attributes: label: Environment value: | diff --git a/CHANGELOG.md b/CHANGELOG.md index bcddd5f9e..b3c55a101 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -470,7 +470,7 @@ looks rather complex and messy compared to the full list of changes made for thi - Pass filter params to getApiDocument (https://github.com/flarum/framework/pull/3037) - Use author filter instead of gambit to get a user's discussions (https://github.com/flarum/framework/pull/3068) - [A11Y] Accessibility improvements for the Search component (https://github.com/flarum/framework/pull/3017) -- Add determinsm to extension order resolution (https://github.com/flarum/framework/pull/3076) +- Add determinism to extension order resolution (https://github.com/flarum/framework/pull/3076) - Add cache control headers to the admin area (https://github.com/flarum/framework/pull/3097) ### Fixed diff --git a/extensions/package-manager/locale/en.yml b/extensions/package-manager/locale/en.yml index b7e0816bf..694a2dde2 100755 --- a/extensions/package-manager/locale/en.yml +++ b/extensions/package-manager/locale/en.yml @@ -97,7 +97,7 @@ flarum-extension-manager: update: Update minor_update_confirmation: - content: This will also update any other extensions/packages with availabe updates. + content: This will also update any other extensions/packages with available updates. sections: discover: diff --git a/extensions/package-manager/src/Command/CheckForUpdatesHandler.php b/extensions/package-manager/src/Command/CheckForUpdatesHandler.php index 82bbc9c4d..f8adc88a1 100755 --- a/extensions/package-manager/src/Command/CheckForUpdatesHandler.php +++ b/extensions/package-manager/src/Command/CheckForUpdatesHandler.php @@ -107,7 +107,7 @@ class CheckForUpdatesHandler /** * Composer can sometimes return text above the JSON. - * This method tries to remove such occurences. + * This method tries to remove such occurrences. */ protected function cleanJson(string $composerOutput): string { diff --git a/extensions/package-manager/tests/integration/api/extensions/RemoveExtensionTest.php b/extensions/package-manager/tests/integration/api/extensions/RemoveExtensionTest.php index 07a3b7709..6b77a78b8 100644 --- a/extensions/package-manager/tests/integration/api/extensions/RemoveExtensionTest.php +++ b/extensions/package-manager/tests/integration/api/extensions/RemoveExtensionTest.php @@ -37,7 +37,7 @@ class RemoveExtensionTest extends TestCase } #[Test] - public function removing_a_non_existant_extension_fails() + public function removing_a_non_existent_extension_fails() { $response = $this->send( $this->request('DELETE', '/api/extension-manager/extensions/flarum-potato', [ diff --git a/extensions/package-manager/tests/integration/api/extensions/RequireExtensionTest.php b/extensions/package-manager/tests/integration/api/extensions/RequireExtensionTest.php index 4ca128ae1..bff43f94d 100644 --- a/extensions/package-manager/tests/integration/api/extensions/RequireExtensionTest.php +++ b/extensions/package-manager/tests/integration/api/extensions/RequireExtensionTest.php @@ -77,7 +77,7 @@ class RequireExtensionTest extends TestCase } #[Test] - public function requiring_an_uncompatible_extension_fails() + public function requiring_an_incompatible_extension_fails() { $response = $this->send( $this->request('POST', '/api/extension-manager/extensions', [ @@ -95,7 +95,7 @@ class RequireExtensionTest extends TestCase } #[Test] - public function requiring_an_uncompatible_extension_with_specific_version_fails() + public function requiring_an_incompatible_extension_with_specific_version_fails() { $response = $this->send( $this->request('POST', '/api/extension-manager/extensions', [ diff --git a/extensions/subscriptions/locale/en.yml b/extensions/subscriptions/locale/en.yml index a6b507d36..f19f63746 100644 --- a/extensions/subscriptions/locale/en.yml +++ b/extensions/subscriptions/locale/en.yml @@ -69,7 +69,7 @@ flarum-subscriptions: body: | {poster_display_name} just posted in a discussion you're following: [{title}]({url}). - You won't recieve any more notifications about this discussion until you're up-to-date. + You won't receive any more notifications about this discussion until you're up-to-date. ## # REUSED TRANSLATIONS - These keys should not be used directly in code! diff --git a/extensions/tags/CHANGELOG.md b/extensions/tags/CHANGELOG.md index 3809bec70..b7efcbd8e 100644 --- a/extensions/tags/CHANGELOG.md +++ b/extensions/tags/CHANGELOG.md @@ -12,7 +12,7 @@ ### Fixed - UI does not reflect bypass tag requirements permission (https://github.com/flarum/tags/pull/148). -- Occassional errors when deleting flagged posts (https://github.com/flarum/tags/pull/154) +- Occasional errors when deleting flagged posts (https://github.com/flarum/tags/pull/154) - Tag discussion count doesn't adjust when deleting first/only post of the discussion (https://github.com/flarum/tags/pull/154) ## [1.1.0](https://github.com/flarum/tags/compare/v1.0.3...v1.1.0) diff --git a/framework/core/js/src/common/ExportRegistry.ts b/framework/core/js/src/common/ExportRegistry.ts index ca50ab586..42c73e3f7 100644 --- a/framework/core/js/src/common/ExportRegistry.ts +++ b/framework/core/js/src/common/ExportRegistry.ts @@ -12,7 +12,7 @@ export interface IExportRegistry { add(namespace: string, id: string, object: any): void; /** - * Add a function to run when object of id "id" is added (or overriden). + * Add a function to run when object of id "id" is added (or overridden). * If such an object is already registered, the handler will be applied immediately. */ onLoad(namespace: string, id: string, handler: Function): void; diff --git a/framework/core/js/src/common/app.ts b/framework/core/js/src/common/app.ts index b487c0da2..d90f56786 100644 --- a/framework/core/js/src/common/app.ts +++ b/framework/core/js/src/common/app.ts @@ -7,7 +7,7 @@ const w = window as any; * Proxy app. Common JS is run first, at which point `window.app` is not * set as this is done by the namespaced JS. * - * When the corrent value is set, this code would retain the reference to + * When the current value is set, this code would retain the reference to * the original invalid value. * * By using a proxy, we can ensure that our `window.app` value is always diff --git a/framework/core/js/src/common/resolvers/DefaultResolver.tsx b/framework/core/js/src/common/resolvers/DefaultResolver.tsx index 37fddb277..0f737af6d 100644 --- a/framework/core/js/src/common/resolvers/DefaultResolver.tsx +++ b/framework/core/js/src/common/resolvers/DefaultResolver.tsx @@ -26,7 +26,7 @@ export default class DefaultResolver< /** * When a route change results in a changed key, a full page - * rerender occurs. This method can be overriden in subclasses + * rerender occurs. This method can be overridden in subclasses * to prevent rerenders on some route changes. */ makeKey(): string { diff --git a/framework/core/js/src/common/utils/styleSelectedText.ts b/framework/core/js/src/common/utils/styleSelectedText.ts index 14ab47255..71eee1ff7 100644 --- a/framework/core/js/src/common/utils/styleSelectedText.ts +++ b/framework/core/js/src/common/utils/styleSelectedText.ts @@ -289,19 +289,19 @@ function makePrefix(index: number, unorderedList: boolean): string { } function clearExistingListStyle(style: StyleArgs, selectedText: string): [UndoResult, UndoResult, string] { - let undoResultOpositeList: UndoResult; + let undoResultOppositeList: UndoResult; let undoResult: UndoResult; let pristineText; if (style.orderedList) { undoResult = undoOrderedListStyle(selectedText); - undoResultOpositeList = undoUnorderedListStyle(undoResult.text); - pristineText = undoResultOpositeList.text; + undoResultOppositeList = undoUnorderedListStyle(undoResult.text); + pristineText = undoResultOppositeList.text; } else { undoResult = undoUnorderedListStyle(selectedText); - undoResultOpositeList = undoOrderedListStyle(undoResult.text); - pristineText = undoResultOpositeList.text; + undoResultOppositeList = undoOrderedListStyle(undoResult.text); + pristineText = undoResultOppositeList.text; } - return [undoResult, undoResultOpositeList, pristineText]; + return [undoResult, undoResultOppositeList, pristineText]; } function listStyle(textarea: HTMLTextAreaElement, style: StyleArgs): SelectionRange { @@ -316,7 +316,7 @@ function listStyle(textarea: HTMLTextAreaElement, style: StyleArgs): SelectionRa // If the user intent was to do an undo, we will stop after this. // Otherwise, we will still undo to other list type to prevent list stacking - const [undoResult, undoResultOpositeList, pristineText] = clearExistingListStyle(style, selectedText); + const [undoResult, undoResultOppositeList, pristineText] = clearExistingListStyle(style, selectedText); const prefixedLines = pristineText.split('\n').map((value, index) => { return `${makePrefix(index, style.unorderedList)}${value}`; @@ -326,7 +326,7 @@ function listStyle(textarea: HTMLTextAreaElement, style: StyleArgs): SelectionRa return previousValue + makePrefix(currentIndex, style.unorderedList).length; }, 0); - const totalPrefixLengthOpositeList = prefixedLines.reduce((previousValue, _currentValue, currentIndex) => { + const totalPrefixLengthOppositeList = prefixedLines.reduce((previousValue, _currentValue, currentIndex) => { return previousValue + makePrefix(currentIndex, !style.unorderedList).length; }, 0); @@ -348,9 +348,9 @@ function listStyle(textarea: HTMLTextAreaElement, style: StyleArgs): SelectionRa selectionStart = Math.max(selectionStart + makePrefix(0, style.unorderedList).length + newlinesToAppend.length, 0); selectionEnd = selectionStart; } else { - if (undoResultOpositeList.processed) { + if (undoResultOppositeList.processed) { selectionStart = Math.max(textarea.selectionStart + newlinesToAppend.length, 0); - selectionEnd = textarea.selectionEnd + newlinesToAppend.length + totalPrefixLength - totalPrefixLengthOpositeList; + selectionEnd = textarea.selectionEnd + newlinesToAppend.length + totalPrefixLength - totalPrefixLengthOppositeList; } else { selectionStart = Math.max(textarea.selectionStart + newlinesToAppend.length, 0); selectionEnd = textarea.selectionEnd + newlinesToAppend.length + totalPrefixLength; diff --git a/framework/core/js/src/forum/components/DiscussionListPane.js b/framework/core/js/src/forum/components/DiscussionListPane.js index a79d2ca6d..a20bf9377 100644 --- a/framework/core/js/src/forum/components/DiscussionListPane.js +++ b/framework/core/js/src/forum/components/DiscussionListPane.js @@ -38,7 +38,7 @@ export default class DiscussionListPane extends Component { $(document).on('mousemove', hotEdge); - // When coming from another discussion, scroll to the previous postition + // When coming from another discussion, scroll to the previous position // to prevent the discussion list jumping around. if (app.previous.matches(DiscussionPage)) { const top = app.cache.discussionListPaneScrollTop || 0; diff --git a/framework/core/js/src/forum/components/PostStreamScrubber.js b/framework/core/js/src/forum/components/PostStreamScrubber.js index a16949786..02ecebb9e 100644 --- a/framework/core/js/src/forum/components/PostStreamScrubber.js +++ b/framework/core/js/src/forum/components/PostStreamScrubber.js @@ -179,7 +179,7 @@ export default class PostStreamScrubber extends Component { heights.after = 100 - heights.before - heights.handle; // If the stream is paused, don't change height on scroll, as the viewport is being scrolled by the JS - // If a height change animation is already in progress, don't adjust height unless overriden + // If a height change animation is already in progress, don't adjust height unless overridden if ((options.fromScroll && this.stream.paused) || (this.adjustingHeight && !options.forceHeightChange)) return; const func = options.animate ? 'animate' : 'css'; diff --git a/framework/core/js/src/forum/resolvers/DiscussionPageResolver.ts b/framework/core/js/src/forum/resolvers/DiscussionPageResolver.ts index fb494f351..b2bd28b3b 100644 --- a/framework/core/js/src/forum/resolvers/DiscussionPageResolver.ts +++ b/framework/core/js/src/forum/resolvers/DiscussionPageResolver.ts @@ -19,7 +19,7 @@ export default class DiscussionPageResolver< * Remove optional parts of a discussion's slug to keep the substring * that bijectively maps to a discussion object. By default this just * extracts the numerical ID from the slug. If a custom discussion - * slugging driver is used, this may need to be overriden. + * slugging driver is used, this may need to be overridden. * @param slug */ canonicalizeDiscussionSlug(slug: string | undefined) { diff --git a/framework/core/js/src/forum/states/GlobalSearchState.ts b/framework/core/js/src/forum/states/GlobalSearchState.ts index d686300d5..3532e2371 100644 --- a/framework/core/js/src/forum/states/GlobalSearchState.ts +++ b/framework/core/js/src/forum/states/GlobalSearchState.ts @@ -17,13 +17,13 @@ export default class GlobalSearchState extends SearchState { // We can't do this in the constructor, as this class is instantiated // before pages are rendered, and we need app.current. if (!this.initialValueSet && this.currPageProvidesSearch()) { - this.intializeValue(); + this.initializeValue(); } return super.getValue(); } - protected intializeValue() { + protected initializeValue() { this.setValue(this.getInitialSearch()); this.initialValueSet = true; } diff --git a/framework/core/js/src/forum/utils/slidable.js b/framework/core/js/src/forum/utils/slidable.js index 5a292fe12..3becd587e 100644 --- a/framework/core/js/src/forum/utils/slidable.js +++ b/framework/core/js/src/forum/utils/slidable.js @@ -5,7 +5,7 @@ * * It relies on the element having children with particular CSS classes. * - * The function returns a record with a `reset` proeprty. This is a function + * The function returns a record with a `reset` property. This is a function * which reverts the slider to its original position. This should be called, * for example, when a controls dropdown is closed. * diff --git a/framework/core/locale/core.yml b/framework/core/locale/core.yml index edb62d0d7..a43134280 100644 --- a/framework/core/locale/core.yml +++ b/framework/core/locale/core.yml @@ -526,7 +526,7 @@ core: # These translations are used by the Notifications dropdown, a.k.a. "the bell". notifications: - delete_all_confirm: Are you sure you want to delete all notifications? This action is not reversable + delete_all_confirm: Are you sure you want to delete all notifications? This action is not reversible delete_all_tooltip: Delete all notifications discussion_renamed_text: "{username} changed the title" empty_text: No Notifications diff --git a/framework/core/src/Extend/Theme.php b/framework/core/src/Extend/Theme.php index 3dda047c8..a70a186b5 100644 --- a/framework/core/src/Extend/Theme.php +++ b/framework/core/src/Extend/Theme.php @@ -24,7 +24,7 @@ class Theme implements ExtenderInterface /** * This can be used to override `LESS` files that are imported within the code. * For example, core's `forum.less` file imports a `forum/DiscussionListItem.less` file. - * The contents of this file can be overriden with this method. + * The contents of this file can be overridden with this method. * * @param string $file : Relative path of the file to override, for example: `forum/Hero.less` * @param string $newFilePath : Absolute path of the new file. @@ -41,7 +41,7 @@ class Theme implements ExtenderInterface /** * This method allows overriding LESS file sources. * For example `forum.less`, `admin.less`, `mixins.less` and `variables.less` are file sources, - * and can therefore be overriden using this method. + * and can therefore be overridden using this method. * * @param string $file : Name of the file to override, for example: `admin.less` * @param string $newFilePath : Absolute path of the new file. diff --git a/framework/core/src/Foundation/ContainerUtil.php b/framework/core/src/Foundation/ContainerUtil.php index bf7d859e5..b0ce825dc 100644 --- a/framework/core/src/Foundation/ContainerUtil.php +++ b/framework/core/src/Foundation/ContainerUtil.php @@ -20,7 +20,7 @@ class ContainerUtil * @param Container $container * * @return callable - * @internal Backwards compatability not guaranteed. + * @internal Backwards compatibility not guaranteed. */ public static function wrapCallback(callable|string $callback, Container $container): callable { diff --git a/framework/core/src/Mail/FlarumLogTransport.php b/framework/core/src/Mail/FlarumLogTransport.php index 22c5b29ab..80f3b3c97 100644 --- a/framework/core/src/Mail/FlarumLogTransport.php +++ b/framework/core/src/Mail/FlarumLogTransport.php @@ -27,7 +27,7 @@ class FlarumLogTransport extends LogTransport $string = quoted_printable_decode($string); } - // Overriden to use info, so the log driver works in non-debug mode. + // Overridden to use info, so the log driver works in non-debug mode. $this->logger->info($string); return new SentMessage($message, $envelope ?? Envelope::create($message)); diff --git a/framework/core/src/Notification/NotificationMailer.php b/framework/core/src/Notification/NotificationMailer.php index f320e9850..45b494870 100644 --- a/framework/core/src/Notification/NotificationMailer.php +++ b/framework/core/src/Notification/NotificationMailer.php @@ -55,7 +55,7 @@ class NotificationMailer } /** - * Retrives the email views from the blueprint, and enforces that both a + * Retrieves the email views from the blueprint, and enforces that both a * plain text and HTML view are provided. * * @param MailableInterface&BlueprintInterface $blueprint diff --git a/framework/core/tests/integration/api/discussions/ListWithFulltextSearchTest.php b/framework/core/tests/integration/api/discussions/ListWithFulltextSearchTest.php index ac21921f1..9d89faafa 100644 --- a/framework/core/tests/integration/api/discussions/ListWithFulltextSearchTest.php +++ b/framework/core/tests/integration/api/discussions/ListWithFulltextSearchTest.php @@ -32,7 +32,7 @@ class ListWithFulltextSearchTest extends TestCase // We need to insert these outside of a transaction, because FULLTEXT indexing, // which is needed for search, doesn't happen in transactions. - // We clean it up explcitly at the end. + // We clean it up explicitly at the end. $this->database()->table('discussions')->insert($this->rowsThroughFactory(Discussion::class, [ ['id' => 1, 'title' => 'lightsail in title', 'user_id' => 1], ['id' => 2, 'title' => 'lightsail in title too', 'created_at' => Carbon::createFromDate(2020, 01, 01)->toDateTimeString(), 'user_id' => 1], diff --git a/framework/core/tests/integration/extenders/ApiSerializerTest.php b/framework/core/tests/integration/extenders/ApiSerializerTest.php index e588833bb..1ec6d367c 100644 --- a/framework/core/tests/integration/extenders/ApiSerializerTest.php +++ b/framework/core/tests/integration/extenders/ApiSerializerTest.php @@ -165,7 +165,7 @@ class ApiSerializerTest extends TestCase } #[Test] - public function custom_attributes_can_be_overriden() + public function custom_attributes_can_be_overridden() { $this->extend( (new Extend\ApiResource(UserResource::class)) diff --git a/framework/core/tests/integration/extenders/SearchDriverTest.php b/framework/core/tests/integration/extenders/SearchDriverTest.php index 534ce7bf8..b82fa2e0b 100644 --- a/framework/core/tests/integration/extenders/SearchDriverTest.php +++ b/framework/core/tests/integration/extenders/SearchDriverTest.php @@ -36,7 +36,7 @@ class SearchDriverTest extends TestCase // We need to insert these outside of a transaction, because FULLTEXT indexing, // which is needed for search, doesn't happen in transactions. - // We clean it up explcitly at the end. + // We clean it up explicitly at the end. $this->database()->table('discussions')->insert([ Discussion::factory()->raw(['id' => 1, 'title' => 'DISCUSSION 1', 'user_id' => 1]), Discussion::factory()->raw(['id' => 2, 'title' => 'DISCUSSION 2', 'user_id' => 1]), diff --git a/framework/core/tests/integration/extenders/ServiceProviderTest.php b/framework/core/tests/integration/extenders/ServiceProviderTest.php index 9e4511328..f6205c4dc 100644 --- a/framework/core/tests/integration/extenders/ServiceProviderTest.php +++ b/framework/core/tests/integration/extenders/ServiceProviderTest.php @@ -37,7 +37,7 @@ class ServiceProviderTest extends TestCase $this->app(); $this->assertEquals( - 'overriden_by_custom_provider_register', + 'overridden_by_custom_provider_register', $this->app->getContainer()->make('flarum.forum.middleware') ); } @@ -54,7 +54,7 @@ class ServiceProviderTest extends TestCase $this->app(); $this->assertEquals( - 'overriden_by_second_custom_provider_register', + 'overridden_by_second_custom_provider_register', $this->app->getContainer()->make('flarum.forum.middleware') ); } @@ -72,7 +72,7 @@ class ServiceProviderTest extends TestCase $this->app(); $this->assertEquals( - 'overriden_by_third_custom_provider_boot', + 'overridden_by_third_custom_provider_boot', $this->app->getContainer()->make('flarum.forum.middleware') ); } @@ -84,7 +84,7 @@ class CustomServiceProvider extends AbstractServiceProvider { // First we override the singleton here. $this->app->extend('flarum.forum.middleware', function () { - return 'overriden_by_custom_provider_register'; + return 'overridden_by_custom_provider_register'; }); } } @@ -93,9 +93,9 @@ class SecondCustomServiceProvider extends AbstractServiceProvider { public function register() { - // Second we check that the singleton was overriden here. + // Second we check that the singleton was overridden here. $this->app->extend('flarum.forum.middleware', function ($forumRoutes) { - return 'overriden_by_second_custom_provider_register'; + return 'overridden_by_second_custom_provider_register'; }); } } @@ -106,7 +106,7 @@ class ThirdCustomProvider extends AbstractServiceProvider { // Third we override one last time here, to make sure this is the final result. $this->app->extend('flarum.forum.middleware', function ($forumRoutes) { - return 'overriden_by_third_custom_provider_boot'; + return 'overridden_by_third_custom_provider_boot'; }); } } diff --git a/framework/core/tests/integration/extenders/ValidatorTest.php b/framework/core/tests/integration/extenders/ValidatorTest.php index 8e3c344d3..eafaf4dae 100644 --- a/framework/core/tests/integration/extenders/ValidatorTest.php +++ b/framework/core/tests/integration/extenders/ValidatorTest.php @@ -40,7 +40,7 @@ class ValidatorTest extends TestCase { $this->app()->getContainer()->make(CustomUserValidator::class)->assertValid(['password' => 'simplePassword']); - // If we have gotten this far, no validation exception has been thrown, so the test is succesful. + // If we have gotten this far, no validation exception has been thrown, so the test is successful. $this->assertTrue(true); } @@ -71,7 +71,7 @@ class ValidatorTest extends TestCase $this->app()->getContainer()->make(CustomValidator::class)->assertValid(['password' => 'simplePassword']); - // If we have gotten this far, no validation exception has been thrown, so the test is succesful. + // If we have gotten this far, no validation exception has been thrown, so the test is successful. $this->assertTrue(true); } } diff --git a/php-packages/phpstan/phpstan-baseline.neon b/php-packages/phpstan/phpstan-baseline.neon index 7e7d38a3c..7b618321f 100644 --- a/php-packages/phpstan/phpstan-baseline.neon +++ b/php-packages/phpstan/phpstan-baseline.neon @@ -47,7 +47,7 @@ parameters: # This assumes that the phpdoc telling it it's not nullable is correct, that's not the case for internal Laravel typings. - message: '#^Property [A-z0-9-_:$,\\]+ \([A-z]+\) on left side of \?\? is not nullable\.$#' - # Ignore overriden classes from packages so that it's always easier to keep track of what's being overriden. + # Ignore overridden classes from packages so that it's always easier to keep track of what's being overridden. - message: '#^Method Flarum\\Api\\Serializer\:\:[A-z0-9_]+\(\) has parameter \$[A-z0-9_]+ with no type specified\.$#' - message: '#^Method Flarum\\Api\\Endpoint\\[A-z0-9_]+\:\:[A-z0-9_]+\(\) has parameter \$[A-z0-9_]+ with no type specified\.$#'