Skip to content

Commit

Permalink
Merge pull request #438 from maikelohcfg/main
Browse files Browse the repository at this point in the history
Remove deprecations alerts from sf5.4
  • Loading branch information
stof authored Sep 30, 2022
2 parents 5dd028b + cf42220 commit fa650e6
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/EventListener/BlameListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public function onKernelRequest(RequestEvent $event)
}
}

/**
* @return string[]
*/
public static function getSubscribedEvents()
{
return array(
Expand Down
3 changes: 3 additions & 0 deletions src/EventListener/LocaleListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public function onKernelRequest(RequestEvent $event)
$this->translatableListener->setTranslatableLocale($event->getRequest()->getLocale());
}

/**
* @return string[]
*/
public static function getSubscribedEvents()
{
return array(
Expand Down
3 changes: 3 additions & 0 deletions src/EventListener/LoggerListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public function onKernelRequest(RequestEvent $event)
}
}

/**
* @return string[]
*/
public static function getSubscribedEvents()
{
return array(
Expand Down
4 changes: 4 additions & 0 deletions src/Uploadable/MimeTypeGuesserAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

class MimeTypeGuesserAdapter implements MimeTypeGuesserInterface
{
/**
* @param string $filePath
* @return ?string
*/
public function guess($filePath)
{
return MimeTypes::getDefault()->guessMimeType($filePath);
Expand Down
17 changes: 17 additions & 0 deletions src/Uploadable/UploadedFileInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,50 @@ public function __construct(UploadedFile $uploadedFile)
$this->uploadedFile = $uploadedFile;
}

/**
* @return ?string
*/
public function getTmpName()
{
return $this->uploadedFile->getPathname();
}

/**
* @return ?string
*/
public function getName()
{
return $this->uploadedFile->getClientOriginalName();
}

/**
* @return ?string
*/
public function getSize()
{
return $this->uploadedFile->getSize();
}

/**
* @return ?string
*/
public function getType()
{
return $this->uploadedFile->getMimeType();
}

/**
* @return int
*/
public function getError()
{
return $this->uploadedFile->getError();
}

/**
* {@inheritDoc}
*
* @return bool
*/
public function isUploadedFile()
{
Expand Down

0 comments on commit fa650e6

Please sign in to comment.