8000 Update micro_kernel_trait.rst by amine-betari · Pull Request #12722 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Update micro_kernel_trait.rst #12722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Feb 9, 2020
Merged

Update micro_kernel_trait.rst #12722

merged 12 commits into from
Feb 9, 2020

Conversation

amine-betari
Copy link
Contributor
@amine-betari amine-betari commented Nov 27, 2019

DIR returns home/aminebetari/Projects/Symfony/my-project/src

dirname(DIR) returns /home/aminebetari/Projects/Symfony/my-project

So if we keep in this example :
require __DIR__.'/vendor/autoload.php'; we will have an error because the path is not correct

But if we change by require dirname(__DIR__).'/vendor/autoload.php'; we will not have the error because we put the correct path

@OskarStark
Copy link
Contributor

Can you please explain why we should change this? Thanks 🙏

@amine-betari
Copy link
Contributor Author

@OskarStark

Done !!

@OskarStark
Copy link
Contributor
OskarStark commented Dec 3, 2019

Thank you.

I did all the steps mentioned in the original paragraph. No errors, but when I add your proposed dirname(__DIR__) I got the following error:
Screenshot 2019-12-03 11 32 13
Here is my directory:
Screenshot 2019-12-03 11 32 26

So I am against this change 👎

@amine-betari
Copy link
Contributor Author

@OskarStark

current_errors

When i keep the current code i have this errror (PJ)

But when i change by my code, i don't have any errors

N.B : I 'm under linux/ubuntu

@OskarStark
Copy link
Contributor

Are you using Apache nginx?
Built in php Webserver or Symfony Webserver?

@amine-betari
Copy link
Contributor Author

@OskarStark
I'm under WebServer Symfony

Guikingone and others added 11 commits February 4, 2020 14:22
…et-magenta)

This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes symfony#13032).

Discussion
----------

fix: very_verbose mode shows estimated time

Small typo in the doc, the format of the progressBar is missing the estimated time in the `very_verbose` mode

the same typo is present in the other versions of the doc

Commits
-------

a0a68bc fix: very_verbose mode shows estimated time
…ements CompilerPassI… (l-vo)

This PR was merged into the 3.4 branch.

Discussion
----------

Fix compiler pass phase when extensions that implements CompilerPassI…

Fix compiler pass phase when extensions that implements CompilerPassnterface are executed

Commits
-------

0a255dc Fix compiler pass phase when extensions that implements CompilerPassInterface are executed
This PR was merged into the 3.4 branch.

Discussion
----------

[Lock] Default path for FlockStore

Hi everyone 👋

As noticed in the source code:

```php

    /**
     * @param string|null $lockPath the directory to store the lock, defaults to the system's temporary directory
     *
     * @throws LockStorageException If the lock directory doesn’t exist or is not writable
     */
    public function __construct(string $lockPath = null)
    {
        if (null === $lockPath) {
            $lockPath = sys_get_temp_dir();
        }
        if (!is_dir($lockPath) || !is_writable($lockPath)) {
            throw new InvalidArgumentException(sprintf('The directory "%s" is not writable.', $lockPath));
        }

        $this->lockPath = $lockPath;
    }
```

`sys_get_temp_dir` is the default path is null is given in the constructor, could it be a good idea to notice this? 🤔

Commits
-------

efbb0b3 refacto(Lock): FlockStore default path
…Toflar)

This PR was squashed before being merged into the 3.4 branch (closes symfony#13063).

Discussion
----------

Added reasoning to autowiring in public bundles

Right now it's just a statement without any arguments which might confuse readers.

Commits
-------

35d2e97 Added reasoning to autowiring in public bundles
Copy link
Contributor
@HeahDude HeahDude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for that PR!

@HeahDude HeahDude added this to the 4.4 milestone Feb 7, 2020
@wouterj wouterj changed the base branch from 4.3 to 3.4 February 9, 2020 15:58
wouterj added a commit that referenced this pull request Feb 9, 2020
…ari, wouterj)

This PR was merged into the 3.4 branch.

Discussion
----------

Finish #12722 "Update micro_kernel_trait.rst"

Closes #12722

Commits
-------

f3fd946 [#12722] Added filename comment to avoid confusion
b96feb6 Update micro_kernel_trait.rst
@wouterj wouterj merged commit b96feb6 into symfony:3.4 Feb 9, 2020
@wouterj
Copy link
Member
wouterj commented Feb 9, 2020

Hi @amine-betari!

I think I found the confusion: You are putting the file in src/index.php, whereas Oskar is putting it in index.php. If you follow the paragraph (and also the recommendation with symfony serve -d), the index.php file has to live in the root (and not in src/).

To fix the confusion, I wanted to change this to put the filepath in a comment at the start of the codeblock (in commit f3fd946). Somehow, I completely messed up the commits in this PR, so I picked your commit and opened a new PR that I merged instead: #13088

Thanks for starting this PR and posting screenshots & details to help find out what's wrong here!

wouterj added a commit to wouterj/symfony-docs that referenced this pull request Feb 9, 2020
* 3.4:
  [symfony#13000] Fixed newline
  [symfony#12722] Added filename comment to avoid confusion
  Update micro_kernel_trait.rst
  Update broken links
wouterj added a commit to wouterj/symfony-docs that referenced this pull request Feb 9, 2020
* 4.4:
  [symfony#13000] Fixed newline
  Update testing.rst
  [symfony#12722] Added filename comment to avoid confusion
  Update micro_kernel_trait.rst
  Update broken links
wouterj added a commit to wouterj/symfony-docs that referenced this pull request Feb 9, 2020
* 5.0:
  [symfony#13000] Fixed newline
  Update testing.rst
  [symfony#12722] Added filename comment to avoid confusion
  Update micro_kernel_trait.rst
  Update link for (No|Admin)Recipient
  Typo
  Update broken links
@amine-betari
Copy link
Contributor Author

Hi @wouterj
Thank you the essential for us is to move forward and help the community

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0