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

php 8+ off message warning #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

BuslikDrev
Copy link

No description provided.

@bsweeney
Copy link
Member

I'm not receiving any deprecation notices about the return type, what's triggering the notice for you? Is this from static analysis?

Regardless, wouldn't it make more sense to specify the return types as we did for the Dompdf iterator (dompdf/dompdf@981c1b9)?

@BuslikDrev
Copy link
Author

BuslikDrev commented Dec 19, 2024

I'm not receiving any deprecation notices about the return type, what's triggering the notice for you? Is this from static analysis?

Regardless, wouldn't it make more sense to specify the return types as we did for the Dompdf iterator (dompdf/dompdf@981c1b9)?

php 8.1 OpenServer
ini_set("display_errors", 1);
ini_set("display_startup_errors", 1);
ini_set('error_reporting', E_ALL);

@bsweeney
Copy link
Member

bsweeney commented Dec 20, 2024

Yes, I have those settings as noted but still do not get the warnings. Unit tests also don't generate anything. I'd like to be able to ensure warnings like these are displayed on my system so I can catch them earlier.

@bsweeney bsweeney added this to the 1.0.2 milestone Dec 20, 2024
@BuslikDrev BuslikDrev closed this Dec 22, 2024
@BuslikDrev BuslikDrev reopened this Dec 22, 2024
@BuslikDrev
Copy link
Author

Yes, I have those settings as noted but still do not get the warnings. Unit tests also don't generate anything. I'd like to be able to ensure warnings like these are displayed on my system so I can catch them earlier.

К сожалению я не могу сказать из-за чего у вас не показывает. Всё зависит от программ которые используете. Возможно они выключают уровень уведомления об устаревании функции php.

image

			foreach (glob(DIR_SYSTEM . 'library/bus_cache/FontLib/*.php', GLOB_BRACE) as $f) {
				include_once($f);
			}

			include_once(DIR_SYSTEM . 'library/bus_cache/FontLib/Table/DirectoryEntry.php');
			include_once(DIR_SYSTEM . 'library/bus_cache/FontLib/TrueType/TableDirectoryEntry.php');
			include_once(DIR_SYSTEM . 'library/bus_cache/FontLib/TrueType/File.php');
			include_once(DIR_SYSTEM . 'library/bus_cache/FontLib/TrueType/Header.php');

			foreach (glob(DIR_SYSTEM . 'library/bus_cache/FontLib/*{/*,/*/*}.php', GLOB_BRACE) as $f) {
				include_once($f);
			}

			$ajax['success_file'] = array();

			$files = array(
				//'view/theme/disco/stylesheet/font-awesome/5.15.1/webfonts/fa-brands-400.eot',
				//'view/theme/disco/stylesheet/font-awesome/5.15.1/webfonts/fa-brands-400.svg',
				//'view/theme/disco/stylesheet/font-awesome/5.15.1/webfonts/fa-brands-400.ttf',
				'view/theme/disco/stylesheet/font-awesome/5.15.1/webfonts/fa-brands-400.woff',
				//'view/theme/disco/stylesheet/font-awesome/5.15.1/webfonts/fa-brands-400.woff2',
				//'view/theme/disco/stylesheet/font-awesome/5.15.1/webfonts/3333.ttf'
			);

			foreach ($files as $file) {
				$file = DIR_CATALOG . $file;

				if (is_file($file)) {
					$file_new = str_replace(array('.eot', '.svg', '.ttf', '.woff', '.woff2'), array('-bus_cache.eot', '-bus_cache.svg', '-bus_cache.ttf', '-bus_cache.woff', '-bus_cache.woff2'), $file);

					// создаём копию оригинала, чтобы не навредить
					copy($file, $file_new);

					// открываем для чтения копию оригинала
					$font = (new FontLib\Font())->load($file_new);
				}
			}

			// чистим временные файлы
			foreach (glob(sys_get_temp_dir() . '/*') as $file) {
				if (is_file($file) && substr(basename($file), 0, 3) == 'fnt') {
					unlink($file);
				}
			}

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

Successfully merging this pull request may close these issues.

2 participants