Skip to content
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

Bug: Class 'Locale' not found when I try to use Time::parse() #2519

Closed
ChibuezeAgwuDennis opened this issue Jan 29, 2020 · 7 comments
Closed
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@ChibuezeAgwuDennis
Copy link

Hello I just rum my cmd command for composer to update my codeigniter 4 framework.
Now I got this problem

Error

Class 'Locale' not found

SYSTEMPATH/I18n\Time.php at line 108

101      * @param string|null $locale
102      *
103      * @throws \Exception
104      */
105     public function __construct(string $time = null, $timezone = null, string $locale = null)
106     {
107         // If no locale was provided, grab it from Locale (set by IncomingRequest for web requests)
108         $this->locale = ! empty($locale) ? $locale : Locale::getDefault();
109 
110         // If a test instance has been provided, use it instead.
111         if (is_null($time) && static::$testNow instanceof Time)
112         {
113             if (empty($timezone))
114             {
115                 $timezone = static::$testNow->getTimezone();

Just like the "Locale" class file has been removed. Please try to solve this issue.



This happen when i try to use this:

$time = CodeIgniter\I18n\Time::parse($time, getConfig('site_timezone'));
return $time->humanize();

I am waiting for this issue to be solve.
@ChibuezeAgwuDennis ChibuezeAgwuDennis added the bug Verified issues on the current code behavior or pull requests that will fix them label Jan 29, 2020
@ChibuezeAgwuDennis ChibuezeAgwuDennis changed the title Bug: Bug: Class 'Locale' not found when I try to use Time::parse() Jan 29, 2020
@ChibuezeAgwuDennis ChibuezeAgwuDennis changed the title Bug: Class 'Locale' not found when I try to use Time::parse() bug: Class 'Locale' not found when I try to use Time::parse() Jan 29, 2020
@ChibuezeAgwuDennis ChibuezeAgwuDennis changed the title bug: Class 'Locale' not found when I try to use Time::parse() Bug: Class 'Locale' not found when I try to use Time::parse() Jan 29, 2020
@ChibuezeAgwuDennis
Copy link
Author

@lonnieezell and @jim-parry Please check this problem

@lonnieezell
Copy link
Member

No need to mention me by name. We're all volunteers here. Wee see every issue that comes through but it sometimes takes a bit to get to it.

@lonnieezell
Copy link
Member

Also - the Locale class is part of the intl extension for PHP. Not specific to our framework so make sure you have that loaded in your current PHP environment.

@ChibuezeAgwuDennis
Copy link
Author

Okay I am sorry

@ChibuezeAgwuDennis
Copy link
Author

let me see what i can do just that I believe you can help me on this

@lonnieezell
Copy link
Member

No worries. If you need additional help, though, please ask on the forums. We just do bugs here.

@ChibuezeAgwuDennis
Copy link
Author

okay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

No branches or pull requests

2 participants