Skip to content

Commit

Permalink
Revert "Replaced base_path('public') with public_path() in ServicePro…
Browse files Browse the repository at this point in the history
…vider (#867)" (#884)

This reverts commit e49e174.
  • Loading branch information
barryvdh authored May 19, 2022
1 parent 91ed300 commit de83130
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function register(): void

$options = $app->make('dompdf.options');
$dompdf = new Dompdf($options);
$path = realpath(public_path());
$path = realpath(base_path('public'));
if ($path === false) {
throw new \RuntimeException('Cannot resolve public path');
}
Expand Down

4 comments on commit de83130

@jaap
Copy link

@jaap jaap commented on de83130 May 19, 2022

Choose a reason for hiding this comment

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

Hi Barry, does this fix the issue with loading the orientation from the config? In that case it might be worth to implement the tests I added in #882 so this behaviour is locked in?

@PaolaRuby
Copy link

Choose a reason for hiding this comment

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

@jaap it don't fix that issue, he is just ignoring you

@feeela
Copy link

@feeela feeela commented on de83130 May 31, 2022

Choose a reason for hiding this comment

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

@barryvdh This breaks if the public folder is not named public. In our case the public folder is named htdocs and the code breaks without changes.

Using $path = realpath(app('path.public')); would use the actual public folder as determined in the Laravel App object.

@erikn69
Copy link
Contributor

@erikn69 erikn69 commented on de83130 May 31, 2022

Choose a reason for hiding this comment

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

@feeela make a PR, maybe this idea: #867 (comment)
Try this: #890

Please sign in to comment.