orchidsoftware / orchidsoftware/platform

Usage of facade aliases causes exceptions when aliases are forbidden in project.

Open
#2,723 2 comments 0 reactions 1 assignee View on GitHub

@tabuna is already working on this.

Since Oct 13, 2023.

Pending
Dominant language
PHP
Stars
4.8k
Forks
662
Avg merge
1d 9h
Merged PRs (30d)
7

Description

Describe the bug
In blade templates you use aliases of facades like {{ Auth::check() }} that cause exceptions like Class "Auth" not found when project discourages usage of aliases.

To Reproduce
Steps to reproduce the behavior:

  1. In config/app.php remove everything from aliases: 'aliases' => []
  2. Open /admin
  3. Get exception Class "Auth" not found

Expected behavior
No exception.

Additional context
In most cases aliases can be replaced by app(class) or fully qualified name of the facade. This way platform will be more independent from the project's configs and restrictions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.