text:
Cannot import Firecrawl in NextJS nodejs route

Checked other resources

[X] I added a very descriptive title to this issue.
[X] I searched the LangChain.js documentation with the integrated search.
[X] I used the GitHub search to find a similar question and didn't find it.
[X] I am sure that this is a bug in LangChain.js rather than my code.
[X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code
import { FireCrawlLoader } from '@langchain/community/document_loaders/web/firecrawl'
Error Message and Stack Trace (if applicable)
 Error [ERR_REQUIRE_ESM]: require() of ES Module node_modules/@mendable/firecrawl-js/build/index.js from node_modules/@langchain/community/dist/document_loaders/web/firecrawl.cjs not supported.
Instead change the require of index.js in node_modules/@langchain/community/dist/document_loaders/web/firecrawl.cjs to a dynamic import() which is available in all CommonJS modules.
    at mod.require (node_modules/next/dist/server/require-hook.js:65:28)
    at Object.<anonymous> (node_modules/@langchain/community/dist/document_loaders/web/firecrawl.cjs:7:40)
    at mod.require (node_modules/next/dist/server/require-hook.js:65:28)
    at Object.<anonymous> (node_modules/@langchain/community/document_loaders/web/firecrawl.cjs:1:18)
    at mod.require (node_modules/next/dist/server/require-hook.js:65:28)
    at @langchain/community/document_loaders/web/firecrawl (web/.next/server/app/api/inngest/route.js:22:18)
    at __webpack_require__ (web/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(rsc)/./src/services/llm/tools/SiteScraper.ts:5:109)
    at (rsc)/./src/services/llm/tools/SiteScraper.ts (web/.next/server/app/api/inngest/route.js:941:1)
    ...
    ...
    at (rsc)/./src/inngest/functions/index.ts (web/.next/server/app/api/inngest/route.js:652:1)
    at __webpack_require__ (web/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(rsc)/./src/app/api/inngest/route.ts:10:76)
    at (rsc)/./src/app/api/inngest/route.ts (web/.next/server/app/api/inngest/route.js:612:1)
    at __webpack_require__ (web/.next/server/webpack-runtime.js:33:43)
    at eval (webpack-internal:///(rsc)/../node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fapi%2Finngest%2Froute&page=%2Fapi%2Finngest%2Froute&appPaths=&pagePath=private-next-app-dir%2Fapi%2Finngest%2Froute.ts&appDir=2Fweb%2Fsrc%2Fapp&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&rootDir=%2Fweb&isDev=true&tsconfigPath=tsconfig.json&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!:15:121)
    at (rsc)/../node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fapi%2Finngest%2Froute&page=%2Fapi%2Finngest%2Froute&appPaths=&pagePath=private-next-app-dir%2Fapi%2Finngest%2Froute.ts&appDir=%2Fweb%2Fsrc%2Fapp&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&rootDir=%2Fweb&isDev=true&tsconfigPath=tsconfig.json&basePath=&assetPrefix=&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D! (web/.next/server/app/api/inngest/route.js:572:1) {
  code: 'ERR_REQUIRE_ESM',
  page: '/api/inngest'
}
 PUT /api/inngest 500 in 36ms

Description
The above import fails in NextJS 14.2.5, when imported via a route whose runtime is nodejs.
Here's my tsconfig's potentially applicable section:
    "target": "esnext",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "allowArbitraryExtensions": true,
    "allowImportingTsExtensions": true,
    "allowJs": true,
    "skipLibCheck": true,
    "strict": true,
    "noEmit": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "bundler",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "downlevelIteration": true,
    "jsx": "preserve",
    "incremental": true,

Nothing special in our next.config.js
System Info
yarn info langchain
└─ langchain@npm:0.2.8
   ├─ Instances: 1
   ├─ Version: 0.2.8
   │
   └─ Dependencies
      ├─ @langchain/core@npm:>=0.2.9 <0.3.0 → npm:0.2.12
      ├─ @langchain/openai@npm:>=0.1.0 <0.3.0 → npm:0.2.1
      ├─ @langchain/textsplitters@npm:~0.0.0 → npm:0.0.2
      ├─ binary-extensions@npm:^2.2.0 → npm:2.2.0
      ├─ js-tiktoken@npm:^1.0.12 → npm:1.0.12
      ├─ js-yaml@npm:^4.1.0 → npm:4.1.0
      ├─ jsonpointer@npm:^5.0.1 → npm:5.0.1
      ├─ langchainhub@npm:~0.0.8 → npm:0.0.8
      ├─ langsmith@npm:~0.1.30 → npm:0.1.34
      ├─ ml-distance@npm:^4.0.0 → npm:4.0.1
      ├─ openapi-types@npm:^12.1.3 → npm:12.1.3
      ├─ p-retry@npm:4 → npm:4.6.2
      ├─ uuid@npm:^9.0.0 → npm:9.0.1
      ├─ yaml@npm:^2.2.1 → npm:2.4.1
      ├─ zod-to-json-schema@npm:^3.22.3 → npm:3.23.0
      └─ zod@npm:^3.22.4 → npm:3.23.8

Mac
Node 20.11.1
Yarn 4.0.2

cc @ericciarla have you seen anything like this before?

Update: if I use "type": "module" in my package.json, the problem disappears. Is that a requirement of Langchain?

@spencermize no but some packages may only support one or the other natively - we may be able to shim it in. Will ping their team.

We just added an issue for this!

You rock - thanks! In the immediate term, we're good with running "type": "module", so we can close this ticket unless you want to keep it open.

Another possible solution would be to swap the import of @mendable/firecrawl-js for a dynamic one (similar to the pattern here) as this should be importable from common js (ref).
Sounds like this is in hand now but if not i'd be happy to contribute that change.

@jacoblee93 We just pushed commonjs support for it. Version 0.0.31. 🚀

Ah awesome! Will push a new version with the updated dep. We should also relax it to use ~ I think

@jacoblee93 Apologies, version 0.0.35* fixes it (not 31)! Thank you!

authors: bracesproul ericciarla jacoblee93 nickscamara spencermize toboid


text:
Proposal: return parse error to agent

This PR tries to solve an issue with Agents that causes the agent to return an output without an Action or with a misformatted one.
The changes in this PR introduce a new type of action for AgentStep: AgentError.
Please let me know if this make sense and if you have suggestions or comments.

Thanks for this - we merged something similar to this in a later PR!

source: gharchive/pull-request

repo: langchain-ai/langchainjs

license: MIT

license_type: permissive

license_source: github-api


text:
SqliteSaver and AsyncSqliteSaver missing in 0.2.1

Checked other resources

[X] I added a very descriptive title to this issue.
[X] I searched the LangGraph/LangChain documentation with the integrated search.
[X] I used the GitHub search to find a similar question and didn't find it.
[X] I am sure that this is a bug in LangGraph/LangChain rather than my code.
[X] I am sure this is better as an issue rather than a GitHub discussion, since this is a LangGraph bug and not a design question.

Example Code
from langgraph.checkpoint.aiosqlite import AsyncSqliteSaver
from langgraph.checkpoint.sqlite import SqliteSaver

Error Message and Stack Trace (if applicable)
error shows, both of these packages not available

Description
completely uninstalled previous version of langgraph, 0.2.19
reinstalled / upgraded to 0.2.21
here are other packages:
langchain 0.2.12
langchain-chroma 0.1.2
langchain-community 0.2.11
langchain-core 0.2.28
langchain-google-vertexai 1.0.8
langchain-huggingface 0.0.3
langchain-openai 0.1.20
langchain-text-splitters 0.2.2
langgraph 0.2.1
langgraph-checkpoint 1.0.2
both of AsyncSqliteSaver and SqliteSaver imports are not available
System Info
langchain 0.2.12
langchain-chroma 0.1.2
langchain-community 0.2.11
langchain-core 0.2.28
langchain-google-vertexai 1.0.8
langchain-huggingface 0.0.3
langchain-openai 0.1.20
langchain-text-splitters 0.2.2
langgraph 0.2.1
langgraph-checkpoint 1.0.2

@vbarda think same issue as memory

how to address it ?
i have reinstalled couple of times, but still same issue

pip install langgraph-checkpoint-sqlite

we've split out the sqlite checkpointers into separate library -- please install using langgraph-checkpoint-sqlite. after that the imports will work the same as before. let me know if you run into an issue after that!

source: gharchive/issue

authors: aiAgentButRealHuman hinthornw lesong36 vbarda

repo: langchain-ai/langgraph


text:
cap at ep. 26?

Select your issue type: (check at least one)

[x] Bug
[x] Question
[ ] Suggestion
[ ] Other (please describe):

Describe your issue:
is the cap at episode 26?
there are several with 50 + episodes (even good ones),please make it a higher cap,thank you

Hi. There is no capping within the code (its open source 😄 you can take a look). And here is a image of me grabbing 76 links from Hajime No Ippo

Can you tell me in which anime you got capped at 26? I will take a look.

the last i tried was gintama, filtered to 720, and no matter if i tried serverwise or the all button  upside,
jdl only got 26,every single time..

That's very weird. Can you please share the link? I will definitely try to find out whats wrong.

sure
https://9anime.to/watch/gintama0-dub.q3wj/71ko7j

Its as I explained 1 comment above. I checked your link. Episode 27 onwards there are no 720p links. You  can test this yourself. Go to any episode (ex: episode 28) and check if it has 720p in the quality select.
Grabber can only grab links that 9anime has 😄

@yumiris do you think a message should be displayed when grabber fails to find the preferred quality?

facepalm ok, i didnt check if they have 27+ a 720sh, sorry,but i was wondering myself,i tried 2 others just now,and they came thru easy,..yes your script is flawless
can i make a suggestion, a (X) function "best possible resolution", so it takes 720 and the few missing..or half of it, in next lower,might be troublesome to make,but its worth to ask.
however in every single other smaller series,that thing leeches flawless,thanks for that.

@Spamfolder haha yeah we were discussing that right now. Would you mind making a separate issue for that? That way it will be easier to keep track

can do,thanks again,sorry for bothering you with that usererror.

@Spamfolder you didn't bother at all. This led to a good talk about fallbacks 😄
If you have any more suggestions remember to file an issue.


text:
fix: update toml_edit and use toml crate for easy parsing

[ ] Added an entry to CHANGELOG.md if this change could be valuable to users

What’s the benefit of this?

toml_edit removes easy feature in newer versions

https://github.com/toml-rs/toml/blob/25fafe6766e8f7bf5353ea8a1afbf889ae38e9b2/crates/toml_edit/CHANGELOG.md?plain=1#L105

It's also to remove duplicate crate versions but since everything is connected and depends on each other it's quite hard to do properly at once

additional toml crate?

We already have it in lockfile so it's not really additional
https://github.com/lapce/lapce/blob/f36c9612edd9db1504f30a5650583ba0d0318e51/Cargo.lock#L4836-L4843

Got it. Thanks!

repo: lapce/lapce


text:
Bind for 0.0.0.0:22 failed: port is already allocated

I want to run docker-compose up -d nginx mysql, but am getting an error:

Bind for 0.0.0.0:22 failed: port is already allocated

Nothing is using port 22 (as far as I'm aware) before running this. Any ideas?

damienshiells@MacBook-Pro-2 laradock (master) $ lsof -i tcp:22
damienshiells@MacBook-Pro-2 laradock (master) $ docker-compose up -d nginx mysql
Creating network "laradock_default" with the default driver
Creating laradock_volumes_source_1
Creating laradock_volumes_data_1
Creating laradock_workspace_1
Creating laradock_mysql_1
Creating laradock_php-fpm_1
ERROR: for php-fpm  Cannot start service php-fpm: driver failed programming external connectivity on endpoint laradock_php-fpm_1 (27854cece00612e3b61fce9db84524ad59e66f7ea571e345f71358daea4ca1ed): Bind for 0.0.0.0:22 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.
damienshiells@MacBook-Pro-2 laradock (master) $ lsof -i tcp:22
COMMAND    PID          USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
com.docke 1564 damienshiells   20u  IPv4 0x3cb5866d777d4fcf      0t0  TCP *:ssh (LISTEN)

I changed the workspaces ports from 22:22 to 2201:22. Mac must secretly have something bound to port 22 already. Anyway, works now :)

I found this error as well, and ran:
netstat -lp | grep 2222
The relevant return line:
tcp6       0      0 [::]:2222               [::]:*                  LISTEN      4546/docker-proxy

That allowed me to find out what was hanging onto that port and discovered it was 4546/docker-proxy (whatever that is)  I'm not too docker savvy, but I know laradock workspace had absolutely no problems running on that port for ssh, now it is choking and I had to switch the port to something else as that was being used. Ran that netstat again and looked for docker-proxy instead... here's all it has it's nose in:
tcp6       0      0 [::]:6379               [::]:*                  LISTEN      29077/docker-proxy
tcp6       0      0 [::]:2222               [::]:*                  LISTEN      4546/docker-proxy
tcp6       0      0 [::]:http               [::]:*                  LISTEN      31281/docker-proxy
tcp6       0      0 [::]:9010               [::]:*                  LISTEN      28733/docker-proxy
tcp6       0      0 [::]:8087               [::]:*                  LISTEN      4470/docker-proxy
tcp6       0      0 [::]:https              [::]:*                  LISTEN      31267/docker-proxy
tcp6       0      0 [::]:2722               [::]:*                  LISTEN      30749/docker-proxy

I have no idea what this docker-proxy process is and/or why is it needed now, as opposed to all the time I've been using docker and this never happened.... Will have to keep looking for more info and see....

repo: laradock/laradock


text:
Failed to build workspace

Building workspace
Step 1/106 : FROM laradock/workspace:1.8-70
ERROR: Service 'workspace' failed to build: manifest for laradock/workspace:1.8-70 not found

Step 1/102 : FROM laradock/workspace:1.8-56
ERROR: Service 'workspace' failed to build: manifest for laradock/workspace:1.8-56 not found
Step 1/106 : FROM laradock/workspace:1.8-70
ERROR: Service 'workspace' failed to build: manifest for laradock/workspace:1.8-70 not found
It only works with php 7.1 (PHP_VERSION=71)

My bad, seems there wasn't a 1.8 tag yet for the versioned fixed in #860. They're added, now building and should soon be usable.

Ok, this should be fixed now!

authors: markhilton maurosbu winfried-van-loon


text:
全文翻译

下面这段是原来的文档有,现在的文档默认没有,不知道该不该加,我已经加到倒数第二段了.如果不对,请删除:
移除时间戳记和软删除
要移除 timestamps、nullableTimestamps 或 softDeletes 字段类型，您可以使用以下方法：

命令
功能描述

$table->dropTimestamps();
移除 created_at 和 updated_at 字段

$table->dropSoftDeletes();
移除 deleted_at 字段

保存引擎
要配置数据表的保存引擎，可在结构生成器配置 engine 属性：
Schema::create('users', function($table)
{
	$table->engine = 'InnoDB';

	$table->string('email');
});

:rose:
@lifesign 看下这块要不要删除和官方文档保持一致？

@NauxLiu 删除吧 尽量和官方一致

已移除： 62195662cf8fab4e08b950a09540f7e4bc9aada2

authors: NauxLiu lifesign wedojava

repo: laravel-china/docs

license: mit

license_source: bigquery


text:
Breaking change in Table Actions?

Package
filament/filament
Package Version
v2.11.8
Laravel Version
v9.10.1
Livewire Version
v2.10.5
PHP Version
8.0.18
Bug description
When adding the impersonate plugin (https://github.com/stechstudio/filament-impersonate) Action button to the Users table like so:
            ->prependActions([
                Impersonate::make('impersonate'),
            ]);

I get the following error: Typed property Filament\Tables\Actions\Action::$view must not be accessed before initialization
I was told that https://github.com/laravel-filament/filament/pull/2246 should fix it, but I am fully updated and it doesn't appear to have solved it. Dan asked me to open an issue as it appears to be more a Filament Admin issue/change than the plugin itself.
Steps to reproduce
See bug description
Relevant log output
Filament\Tables\Actions\Action::getView
vendor/filament/tables/src/Actions/Concerns/HasView.php
:39

Pretty sure this is fixed in latest release.

Pretty sure this is fixed in latest release.

I submitted this after the latest release that has the PR mentioned in this issue that supposedly solves it. You can see my my versioning that I should already have it.

stechstudio/filament-impersonate#12

authors: MACscr danharrin ryangjchandler

repo: laravel-filament/filament


text:
Update to app dir

Hi all,
This pull request migrates the codebase to support the new app directory within Next.js v13. This new directory allows components to become server-side rendered and also tidies up some options.
In addition, it fixes the flicker bug that will show the dashboard (or any auth endpoint) for a split second.
The only thing not implemented with this directive are the header props, as it doesn't seem possible with the multi-shared layout. However I am open to any feedback/commits to it if anyone knows.
Thanks

@heychazza can you remove the yarn.lock (which we don't use ourselves).

@heychazza can you remove the yarn.lock (which we don't use ourselves).

Done! :)
I've also fixed the "flash" issue that happened in this template, where users could see the dashboard for a split second before the redirect kicks in.

Will wait for follow up on the header props.

@heychazza @taylorotwell  As far as I know it's not possible to pass props to layout components from the children with the new app router. Could we not just keep it simple and create a Header component?
const Header = ({ children }) => {
    return (

                {children}

    )
}

export default Header

Then use this component in each page, for example:
import Header from '@/components/Header'

const Dashboard = () => {
    return (
        <>

                    Dashboard

                                You're logged in!

        </>
    )
}

export default Dashboard

The layout.js component will also need to be updated:
'use client';

import Navigation from '@/components/Navigation';
import { useAuth } from '@/hooks/auth';

export default function AuthLayout({ children }) {
    const { user } = useAuth({ middleware: 'auth' })

    if (typeof user === "undefined") {
        return null;
    }

    return (

            <Navigation />
            {children}

    )
}

@heychazza @taylorotwell @ammar-madni  With the new implementation getting: Error: Request failed with status code 404 on login and register! how can that be solved ?

@heychazza @taylorotwell @ammar-madni  how can we allow users to visit certain pages based on roles? at the same time redirect users back to if they try to access restricted resource/page

@heychazza @taylorotwell @ammar-madni how can we allow users to visit certain pages based on roles? at the same time redirect users back to if they try to access restricted resource/page

I’d love to help, but this question isn’t relevant to the PR. You’d be best to ask in the Discord.

Any update on upgrading this repo to use Next 13 ? Thanks

Any update on upgrading this repo to use Next 13 ? Thanks

The repo is already Next v13, it’s just using the pages router instead. This PR changes to the app router

@driesvints when do you have time to handle this PR? Would love to see this merged.

@liamseys I don't review PRs or handle the breeze-next repo sorry. Taylor doesn't see draft PRs so if you need feedback or a review please mark this as ready.

@heychazza are you still working on this one?

@heychazza are you still working on this one?

Yes, just been busy - happy for you to P.R. if you wanted to finalise the headers

Using same auth hook with new nextjs 13 structure https://github.com/priteshloke/breeze-next-13

Why has this pr been closed? Any updates on whether this repo will be updated to use the app dir?

@Deniz073 I have used it in production using a app dir, works fine and also redirects well, just include a role column in your user table and make user of the middleware's to guide your redirection on each page load.

Hello everyone, if anyone has time, can you please take a look into this.
https://github.com/vipertecpro/nextjs-app-for-laravel-apis
I am using app Dir, i don't know if it is correct or not.

authors: Deniz073 Silomalo ammar-madni driesvints heychazza johnymanuelli liamseys priteshloke taylorotwell vipertecpro

repo: laravel/breeze-next


text:
Can not update default card details anymore

This might be a rare case but it happened today for me, so i just want to share here maybe it worth to check. When creating Stripe customer:
Auth::user()->createAsStripeCustomer($token);

It created Stripe customer, card and associated them on Stripe but failed to update card_brand and card_last_four columns at my database. So when i call Auth::user()->updateCard($token); for same user it never updates because of following control:
if ($token[$token->type]->id === $customer->default_source) {
  return;
}

In case of database connection problem or something else when card details could not be updated on database, is it possible to add a new check inside control as:
if ($token[$token->type]->id === $customer->default_source) {
  if (! $this->card_brand)
    $this->fillCardDetails($token[$token->type])->save();
  return;
}

I am using Laravel 5.5 with Cashier 7.0

I think this problem occur because you are adding same card.

Yes same card, but still there must be a way to update card_brand and card_last_four columns when calling updateCard.

@ahalimkara what is mean of update same card? updateCard method only update value if the card was different from the last one.

In my first post, the problem was to unable to update database (card created and associated with customer at Stripe successfully). So user might use same card for purchase etc. but i will never set default card for customer in my database if i fail to add to database in first purchase. Or i need to do it manually. I just thought it might be good to have an extra check in updateCard method.

@ahalimkara Cashier manage everything if you go with proper documentation, whenever you create new subscription with this method
$user->newSubscription('main', 'premium')->create($stripeToken);
it will automatically did entry on database and same in the case whenever you updateCard method it will automatically update your card and make new card as default card and next time user won't need to purchase the subscription after plan expired , its automatically renewed if user won't cancel their subscription and if user cancel subscription and want to resume again than you can resume it with resume method if user is still Grace period, in short there is everything available in cashier, for more details read document.
https://laravel.com/docs/5.5/billing

Thank you @sagar-mi for information. The problem was not about usage of Cashier, it was just a suggestion and I think contributors understood what it is.

The card brand and last four should always be filled. If not, it seems that there was a hiccup on your end. You can always use the updateCardFromStripe to sync the card details again from Stripe.

authors: ahalimkara driesvints sagar-mi

repo: laravel/cashier


text:
Array casting does not work with PgSQL native arrays

Laravel Version: 5.2.45
PHP Version: 7.0.13
Database Driver & Version: PostgresSQL 9.5 pdo_psql

Description:
When trying to save a casted array in PgSQL Laravel fails with an error:

[PDOException]
SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  malformed array literal: "[3,4,5,6]"
DETAIL:  Missing "]" after array dimensions.

This only happens with native PgSQL array types.
Steps To Reproduce:

Setup your application with PosgreSQL DB engine.
Create a table in the DB with one column testing being integer[]
Create a model that has an attribute testing and in $casts has a type 'array'
Instantiate your model and assign testing an integer array: $model->testing = array(1,3,4,5);
Save the model $model->save.
Observe the SQL error.

Solution
Add custom support for PgSQL for array casting?

@martimarkov 5.2 is not supported anymore, please check if the error still exists in 5.3

authors: martimarkov themsaid

repo: laravel/framework


text:
Container should throw or catch ReflectionException

Laravel Version: 5.8.4
PHP Version: 7.2.1
Database Driver & Version: N/A

Description:
This is not a "real" bug, but I don't know what kind of issue I should have created for this.
When using the make method from the Illuminate\Container\Container class, if the given $abstract does not exists in container, it will try to create a reflection class of it (on line 794).
This line can throw a ReflectionException if the class does not exits.
I think this exception should appears in the @throws tags of the method which are concerned, or should be try / catch to throw a BindingResolutionException.
What do you think about it ?
I will make a PR to fix this if necessary, but before I want to discuss this issue.

Personally I think it's a nightmare to correctly maintain all the @throws and they should just be removed:

if it's an exception in the same method, you can usually easily see it yourself
if it's deep down, it usually gets out of sync in the docs anyway

@mfn For me, this documentation tag has its utility.
In my case, I was trying to only catch the BindingResolutionException. The fact that make method can throw the ReflectionException was creating a bug, because I was catching the wrong exception.

Hmm, I agree with the fact that if the exception cascades through the method it might be wanted to add to to the DocBlock. In any case, like you said, this isn't really a bug and perhaps better should be taken up on the ideas repo so I'm going to close this off. You're always free to attempt a PR.
Thanks!

@driesvints Ok, no problem.
Do you think it is be a good idea to catch the ReflectionException and throw a BindingResolutionException  instead ?
I would like to create a pull-request to include this behavior, but it contains a breaking change since people who are catching ReflectionException will loose this exception throwing.

@paul-thebaud maybe yeah. Might be worth a pr. But you also might post at the ideas repo first to get support.

authors: driesvints mfn paul-thebaud


text:
when i just use the "illuminate/support" package, it throw a exception that Class 'PhpOption\Option' not found in /illuminate/support/Env.php file

Laravel Version: 8.5.10
PHP Version: 7.2.0
Database Driver & Version:

Description:
when i just use the "illuminate/support" package, it throw a exception that Class 'PhpOption\Option' not found in /illuminate/support/Env.php file, so I watch the composer.json file and i dont find a reqiure that "phpoption/phpoption" in composer.json of  "illuminate/support"
Steps To Reproduce:
please write "phpoption/phpoption" package into  composer.json of  "illuminate/support"

Just use yourself! Env class require vlucas/phpdotenv.
/src/Illuminate/Support/composer.json:49

See the answer above. The package is in the suggest list which are optional dependencies you need to install yourself.

authors: dinhquochan driesvints jason-liang


text:
[Proposal] Eloquent Record Cloning.

The ability to clone a record through Eloquent would be nice.
Example:
$user = User::clone(1); // basically similar to User::find(1);
$user->name = "John Doe"; // change the name field on the record
$user->save(); // Now instead of updating that record,
               // it creates a new one with user #1 data,
               // only with the name attribute changed.

@anlutro Was this functionality removed or changed somehow?
I was trying it out and it doesn't seem to be replicating the relationships.
$campaign = Campaign::find(1);
$new = $campaign->replicate();
$new->save();
dd($campaign->banners->toArray(), $new->banners->toArray());

The result is as follows:
array:4 [
	0 => array:14 [▶]
	1 => array:14 [▶]
	2 => array:14 [▶]
	3 => array:14 [▶]
]

[]

I also tried using push() instead of save() as commented here:
/**
* Save the model and all of its relationships.
*
* @return bool
*/
public function push()
// .. snip

But to no avail. I get the same results.
Any ideas?

@anlutro Was this functionality removed or changed somehow?
I was trying it out and it doesn't seem to be replicating the relationships.
$user = User::find(1);
$new = $user->replicate();
$new->save();
dd($user->roles->toArray(), $new->roles->toArray());

The result is as follows:
array:4 [
	0 => array:14 [▶]
	1 => array:14 [▶]
	2 => array:14 [▶]
	3 => array:14 [▶]
]

[]

I also tried using push() instead of save() as commented here:
/**
* Save the model and all of its relationships.
*
* @return bool
*/
public function push()
// .. snip

But to no avail. I get the same results.
Any ideas?

authors: killswitch paper-reilg sans-clue


text:
[5.4] Add Checks for Years greater than 9999

PHP has some difficult handling dates with a year over 9999 for example if you pass a date like "20196-05-25" into Carbon (and DateTime) it will throw an error. However, the date validator considers this date to be valid.
InvalidArgumentException was thrown!  The separation symbol could not be found Unexpected data found. Data missing
#0 ./vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(2969): Carbon\Carbon::createFromFormat('Y-m-d H:i:s', '20196-05-25')
#1 ./vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(2923): Illuminate\Database\Eloquent\Model->asDateTime('20196-05-25')
#2 ./vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(2878): Illuminate\Database\Eloquent\Model->fromDateTime('20196-05-25')
#3 ./vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(450): Illuminate\Database\Eloquent\Model->setAttribute('date_at', '20196-05-25')

The problem with the validateDate is that it is making use of the PHP function date_parse() which is changing the year 20196 to 2006 which is then being pumped into checkdate() which will validate because date_parse() has "corrected" it.
This is loosely related to issue #329 validateDate could be better and is me finally fixing the bug #6329 I reported in 2014 (sorry for the delay).

Related: https://github.com/briannesbitt/Carbon/pull/586
5-digit years are valid (and they do have use cases). We should support them if it is technically doable. Avoiding crazy distant years is a different concern.
If we want to define the end of the world, why should it be 9999 in particular? Maybe we are playing Final Fantasy?
ping @lucasmichot

I would agree that they are technically valid dates but PHP doesn't handle it well and most database engines I believe are commonly used don't support them well, if at all:
echo (new DateTime('20000-01-01'))->format('Y-m-d'); // Wrong Output: `2000-01-01`
echo (new DateTime())->setDate(20000, 1, 1)->format('Y-m-d'); // Correct Output: `20000-01-01`

MySQL doesn't support dates greater than 9999 or lower than 10001, same with MariaDB2
SQLite only supports dates between 0000-01-01 and 9999-12-313
MS SQL only supported date range is January 1, 1753, through December 31, 99994
PostgreSQL does support a year upto 294276 but not below -47135

CREATE TABLE `datetest` (
  `date` date
);
INSERT INTO `datetest` VALUES ('2000-01-01'), ('20000-01-01'), ('200-01-01');
SELECT * FROM `datetest`;

Results from MySQL 5.6.34:

date

2000-01-01

0000-00-00

0200-00-00

There are probably some edge cases where it might be useful, but I would guess that they are extremely rare. Even if we amended the code where Laravel creates the Carbon (or if Carbon was corrected to support it) the validator would still be incorrect as it would see the year 20196 as if it were 2006.
Side Note: I do approve of your edge case of Final Fantasy as I am a long time fan of the series, but SquareEnix don't always use the Julian Calendar, for example Final Fantasy XI has an 8 day week, 30 days in every month and always have 360 days a year so PHP's Date and Time libraries would be useless. I gave up trying to understand how the Final Fantasy XIV's calendar worked.

As I finished writing the previous post I realised that the before/after validation rules might be better examples of the bug I am trying to show and also have a related bug:
$v = new Validator($trans, ['x' => '2020-01-02'], ['x' => 'before:2020-01-01']);
$this->assertTrue($v->fails()); // Test Passes

$v = new Validator($trans, ['x' => '20200-01-02'], ['x' => 'before:2020-01-01']);
$this->assertTrue($v->fails()); // Test Fails

Good points about the DB support, great message btw.
And after all, deviating from e.g. the common "yyyy-mm-dd" mask would break in so many places.
(about final fantasy, I was thinking of the infamous damage limit :)

True @vlakoff
Indeed @mattwells this is a bit a edge case; the fact is that Datetime allows to the Y format (4 digits) but no format is available for date with more than 4 digits, which make since a bit tricky to manage.
The funny thing is that Datetime allows to add 5+ digits year to an instance. So basically the problem is at creation.
In fact all of your new tests should be passing BTW....

I had to handle this situation quite often for a project and I finish by always converting my input to a Carbon instance before validating it (this also handles the leap year issue)

I'm not sure what you are referring to as an edge case so I think a little additional information might be helpful as to why I believe this is needed: Both Firefox and Safari1 do not support  and render it as if the type were text. To the best of my knowledge there is no shim that will replace the date input with its own and correctly display the date in the user's local format (in my case UK dd/mm/yyyy) and send it back to the server in Internet format  (yyyy-mm-dd) like the native date input in Chrome and Edge. This has meant that occasionally some of my users have put in dates that pass validation but causing the system to throw an error. I have resolved the issue by adding the regex as a separate validation rule that is run before the date check.
I ran all the tests both with and without the added validation check that before I made the PR and they failed without the new code. I will double check when I'm back at a computer though.
@vlakoff thank you, I learnt the hard way to make your PRs as detailed as you can and backup any additional notes with as much evidence as you can.

Are we speaking about Datetime validation OR datetime validaton for DBMS ? This are 2 different things.
IMO, the validation should pass for a year with more than 4 digits - the way you store this date (an eventually preprocess) in MySQL or SQLite should be handled in your model.

Laravel is validating a date that isn't being convert into a Carbon instance correctly. I was proposing a change that would prevent dates that wasn't being handle correctly from being allowed to enter into the system to begin with, and justifying this decision/action by demonstrating that other software that is often used as part of the finish product don't natively support either as justification that the edge cases are probably not worth worry about.
Looking in the code for generate the Carbon object in the models in the Illuminate\Database\Eloquent\Concerns\HasAttributes class line 700 also makes a 4 digit year assumption:
    /**
     * Determine if the given value is a standard date format.
     *
     * @param  string  $value
     * @return bool
     */
    protected function isStandardDateFormat($value)
    {
        return preg_match('/^(\d{4})-(\d{1,2})-(\d{1,2})$/', $value);
    }

It might make more sense to update the pattern I have created with the one located here.

Agree that we should enforce 4-digit years and be done. Trying to (approximetely) support 5-digit years isn't worth the trouble.
However, you fix here is wrong, because the regex greatly reduces the number of supported formats.

I see your point, do you think that changing the / and -  to a single character wildcard would be sufficient?

I don't think so. The date rule accepts by design the same formats as strtotime(), which means a lot of them.
The difficulty here is that we don't know the format, which makes it difficult (if not impossible) to check if the date has been silently modified. (this method which is used by the date_format rule)

How about we block dates that match this patter #^(\d{5,}[^\d]\d{2}[^\d]\d{2}|\d{2}[^\d]\d{2}[^\d]\d{5,})$#? It should make dates in Y-m-d or d/m/Y formats and block them if they have a year with more than 4 digits

This should work well. Unless anyone thinks of other pitfalls?
(btw, you don't need the parentheses in this regex)
Also quoting this comment on php.net:

Also, note that the anything about the year 10000 is not supported. It appears to use only the last digit in the year field. As such, the year 10000 is interpretted as the year 2000; 10086 as 2006, 13867 as 2007, etc

edit: the parenthesis are actually needed

If we base our changes on the domain of strtotime; then we should realize they are really based on the domain of unix timestamps. Thus we only support 1901 to 2038. Using this definition would lock us into the gregorian calendar system; the hebrew calendar is currently at year 5777.
It may be impossible for us to support all values due to how php (and the database) works internally, but we should at least document our presumtions and requirements if we decide to limit ourselves into a particular span of values.

The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 UTC to Tue, 19 Jan 2038 03:14:07 UTC. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer.)
Source: https://secure.php.net/manual/en/function.strtotime.php

@mattwells Are you suggesting that we should block incoming values in the validateDate method? Your regex wont allow "February 1st 2017" and many other formats supported by the current validation.

Also you regex will allow February 31

I have now amended my commit to use the regex I have in my previous post. It will now check that dates like 20000/01/01, 20000M01D01, 01-01-20000 fail but allow 2000-01-01, 2000M01D01, Feb 1 2000.

@sisve Unix Timestamp have no such limitation, it is a bug introduced by some developers storing the timestamp in a 32-bit signed integer. PHP doesn't store numbers in this way and doesn't have this limitation. The full note that you took your quote from explains this:

The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 UTC to Tue, 19 Jan 2038 03:14:07 UTC. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer.)
Prior to PHP 5.1.0, not all platforms support negative timestamps, therefore your date range may be limited to no earlier than the Unix epoch. This means that e.g. dates prior to Jan 1, 1970 will not work on Windows, some Linux distributions, and a few other operating systems.
For 64-bit versions of PHP, the valid range of a timestamp is effectively infinite, as 64 bits can represent approximately 293 billion years in either direction.

Example:
echo date('d-m-Y', PHP_INT_MAX); // Output: 04-12-292277026596 (maybe different for you)

@lucasmichot The date validator already checks for dates like Feb 31 using the date_parse() and checkdate() functions.
var_dump(checkdate(2, 31, 2016)); // Output: bool(false)

@mattwells My comments regarding the domain of the unix timestamp was based on the presumption that we let the domain of strtotime. If we consider an 32-bit timestamp domain as a bug and ignore it; why don't we do the same for strtotime? We could consider this as a buggy implementation detail of strtotime, and file a bug report for strtotime to support larger year values instead.
A regex solution to block odd inputs will also block values that are currently accepted by the validation, one example being the valid date "February 1st 2017".

Ah yes I understand your point now @sisve, sorry for the miss-understanding, it looks like this bug was reported in 2007 and has yet to be resolved.
The regex is specifically looking for dates in a numeric format such as Y-m-d or d/m/Y with a year having more than 4 digits for the year. This means that your example example "February 1st 2017" will not get caught by the regex but I realise while typing this it wouldn't reject "February 1st 20017" either.
I'm wondering if I can do a pattern match that would look for more than 4 digits together but not block a unix timestamp. Perhaps something more like #(\d{5,}[^\d]|[^\d]\d{5,})# this patter should look for 5 or more digits that is contained in a string that contains none numeric characters. It should ignore 2017/02/01, 01-02-2017 and Feb 1 2017 but catch 20017/02/01, 01-02-20017 and Feb 1 20017.

@mattwells I am not sure this is the right approach, as many formats cannot be taken in consideration

Hi @lucasmichot, are you saying that you favour the version of the regex that is currently in the PR over my suggestion in the last comment? Or that you aren't keen on trying to catch 5 digit years in general? If it is the latter I am running low on ideas and would welcome suggestions.

This regex isn't the correct solution as noted.

authors: lucasmichot mattwells sisve taylorotwell vlakoff


text:
[5.5] Add better error message for missing app key

Running php artisan key:generate is done automatically by laravel new project_name but the experience is still subpar when cloning an existing repo.
This is especially an issue on teams when cloning existing repos. Even more so with new team members who may not know Laravel (or PHP) that well.
The current error message "The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths." is not helpful in determining what to do. It tells you that something is wrong but doesn't pinpoint what that thing is.
Because the most common occurrence of this exception is an empty or missing APP_KEY I thought it would be beneficial to check for this and present a more helpful exception.

You should move your added code above the startsWith test.

Well, this has the advantage of catching APP_KEY=base64: but I guess that's not very likely.

authors: thecrypticace vlakoff


text:
Properly handle boolean casting for “true” and “false” strings

Includes a test case, as well as the suggested fix.

I think this would be considered a breaking change on the 5.4 branch. It changes the behavior of the casting.

I suppose so, thought it seems like it'd be one of those ones filed under https://xkcd.com/1172/ :) Is this something that can make it into the framework at some point? It seems like a bug that any non-empty string is casted to to true, in particular a string like "false".
Thanks very much for your consideration!

@jkmassel You can submit it to the master branch. If you want,I can do it for you :smile:

authors: jkmassel m1guelpf taylorotwell


text:
[5.7] Adding the verified/unverified email scopes

I want also change the markEmailAsVerified method to make sure the email_verified_at change only once by doing this:
/**
  * Mark the given user's email as verified.
  *
  * @return bool
  */
public function markEmailAsVerified()
{
    if ($this->hasVerifiedEmail()) {
        return false;
    }

    return $this->forceFill([
        'email_verified_at' => $this->freshTimestamp(),
    ])->save();
}

I'm going to add the tests if the PR is accepted :+1:

You can add this to your own application.

authors: arcanedev-maroc taylorotwell


text:
[5.7] Revert breaking filesystem changes

This is to revert PR https://github.com/laravel/framework/pull/26010
Although the PR was merged 16 days ago, it was only "tagged" 18 hours ago. We already have 3x reported issues of people experiencing file system permissions issues, which all of them mention that reverting to 5.7.9 solves their problems: https://github.com/laravel/framework/issues/26230, https://github.com/laravel/framework/issues/26229 and at the bottom of the PR https://github.com/laravel/framework/pull/26010
Arguably the problem is not the PR itself, but incorrect file permissions on existing projects.
The issue is as more people start running composer update we are likely to see an increase in reported tickets. And these problems might not appear until the application is pushed to production, which is even worse.
So I suggest the PR perhaps should be targetted to 5.8 and listed as part of the upgrade checklist.
Of course, reverting the PR re-introduces the original edge case bug that it solved - but that seemed to be less of an issue. 🤷♂
p.s. I couldnt create an automatic PR to "revert" the changes, as there have been formatting changes since. So if people could cross check this PR with the original to make sure it's a correct revert - that would be helpful.

A much simpler fix is to change the $this->files->replace() call in src/Illuminate/Foundation/PackageManifest.php to $this->files->write().
Then we can think of a better way to fix the original issue (atomic writing of packages.php).

I identified the exact issue (with help of @Pillmayr) and made a fix here: #26232

authors: Yogarine laurencei


text:
[5.7] Fix collections mapInto - do not pass key as second argument to constructor

For some reason, mapInto() passes the key of the collection as second argument to the constructor of the created instance.
In may case, this caused unexpected results. As this behaviour is not documented and not checked by any test, I am considering this as a bug.
Example Code
class Currency
{
     function __construct(string $code, string $secondArg = "default", string $thirdArg="default2")
     {
         dump("Currency code: " . $code . ", secondArg: " . $secondArg  . ", thirdArg: " . $thirdArg);
     }
}

$collection = collect(['USD', 'EUR', 'GBP']);
$currencies = $collection->mapInto(Currency::class);

Current Output
"Currency code: USD, secondArg: 0, thirdArg: default2"
"Currency code: EUR, secondArg: 1, thirdArg: default2"
"Currency code: GBP, secondArg: 2, thirdArg: default2"

Expected Output
"Currency code: USD, secondArg: default, thirdArg: default2"
"Currency code: EUR, secondArg: default, thirdArg: default2"
"Currency code: GBP, secondArg: default, thirdArg: default2"

Wouldn't be a bad idea to back this up with a test to prevent future issues.

It's not tested, but it looks like the expected behavior to me.
If the collection is an associate array, this is a useful feature.

As noted above, this would be a breaking change for some users.

For this example, a named static constructor can be added to the class and passed into map() as a callable.
class Currency
{
    public function __construct(string $code, string $second = 'default', string $thirdWhy = 'default2')
    {
        // ...
    }

    public static function make(string $code)
    {
        return new static($code);
    }
}

$currencies = collect(['USD', 'EUR', 'GBP'])->map([Currency::class, 'make']);

authors: ahinkle derekmd josiasmontag staudenmeir taylorotwell


text:
[5.8] Container build method catch ReflectionException

This pull-request was discussed at #27959 and laravel/ideas#1573.
It updates the Illuminate\Container\Container (~ line 795) to catch the ReflectionException thrown by the new ReflectionClass($concrete) call. This catch will throw a BindingResolutionException.
This is a small breaking change, since people who are catching ReflectionException on make or build call will now have a BindingResolutionException instead.

Breaking changes aren't merged into patch releases.

authors: paul-thebaud taylorotwell


text:
[7.x] array_key_first function used to get first credential key

When login is attempted and only password key is passed then a function firstCredentialKey is called in src\Illuminate\Auth\EloquentUserProvider.php which is used to get first key from passed credentials array.
In this PR i have removed that foreach loop which returns the first key from credentials array. Instead of that i used array_key_first function.

What does this fix please?

This fix nothing.
But, i realise that there's no need to use that foreach loop as we only need to return key for first index. 😀

The current code is fine, then. In fact, the current code is faster.

Will you please guide me that, how current code is faster ?

@GrahamCampbell , exactly same code was merged with array_key_first function. What was the issue with the PR which I raised?

authors: GrahamCampbell sehmbimanvir


text:
[8.x] Improve support for custom Doctrine column types

Context
This PR is my and @TomHAnderson's follow-up to several other issues and PRs that address registering custom Doctrine columns in Laravel.
Using custom Doctrine column types in a Laravel app is useful because it makes renaming and changing columns in migrations really easy. While Laravel handles creating columns itself internally, it relies on Doctrine to rename columns or make changes to them. Doctrine doesn't have built-in support for all of Laravel's column types, so in a fresh Laravel app there are actually several column types that can be created fluently in migrations but require custom SQL statements to change or rename later.
The TimestampType added by @TomHAnderson in #35591 is a great example of this—it adds platform-specific SQL statements to support handling timestamp columns on several different database drivers, which allows developers to keep calling ->timestamp() in migrations and always have it behave as expected regardless of which driver they're using. Without it, renaming or changing a timestamp column in a migration might also silently convert it to a datetime column, because that's the closest type Doctrine has built in (see #39959).
The Xml and Bit types used in this PR's tests are similar, platform-specific examples, which would make it possible to do things like $table->renameColumn('old_xml_name', 'new_xml_name') or $table->bit('bit_column')->nullable()->change().
See: #35498, #39959, #35591, #39683.
Motivation
There is existing functionality in the framework that handles most of the required setup for registering custom Doctrine types already, and this PR fills in the gaps to make this functionality more consistent.
Specifically, the Laravel documentation includes an example of registering custom column types automatically by listing them in config/database.php, but this currently doesn't work in all contexts (multiple connections, tests, etc.):
use Illuminate\Database\DBAL\TimestampType;

'dbal' => [
    'types' => [
        'timestamp' => TimestampType::class,
    ],
],

Solution
This PR ensures that all custom Doctrine database column types listed in config('database.dbal.types') are registered consistently with the framework, so that columns using those types can be created, changed, renamed, and deleted in migrations and in tests.
Changes

Moves the automatic registration of custom types in config files from the framework's core DatabaseServiceProvider into the DatabaseManager class at the point where a particular database connection is actually created.
Moves the code responsible for performing the registration of a specific custom type from the Schema Builder class into the database Connection class, because Doctrine's type "mappings" are connection-specific.

Usage
Using the database.dbal.types config array as shown above, or calling DB::connection()->registerDoctrineType() directly, should now work as expected in all contexts, and in tests.
Tests
We added tests for the existing TimestampType verifying that timestamp columns can be modified and/or changed to datetime, and vice versa, on supported database drivers.
We also added tests for completely new custom types, xml in Postgres and bit in MySQL, verifying that:

custom types can be registered automatically simply by adding them to the database.dbal.types config array
custom types can be registered on multiple database connections

Finally, we added a test to verify that custom type registration works in tests.
Note: since this feature relies on data types that are specific to certain database drivers, some of our tests are also slightly different for different databases.

I am not against your pull request but wouldn't it make more sense just providing the missing doctrine types than rewriting parts of Laravel, so the user can add new doctrine types? I mean it's already possible to add custom doctrine types for migrations. I am doing this for PostgreSQL where I am adding numerous missing types [1] [2].

@tpetry yeah providing more of the missing types out of the box would be great! You're right it's already possible to do this, this PR just aims to make it a bit easier.

Using custom DBAL types via database.dbal.types leads to the following error with Laravel's parallel testing feature: Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[08006] [7] FATAL:  sorry, too many clients already. Tests work as expected when I register the custom DBAL type using DB::registerCustomDoctrineType() in the AppServiceProvider's registermethod.

@skollro Interesting, do you get that error immediately, like on one of the first tests, or only after a lot of tests have run? I wonder if the code we're calling inside Doctrine is creating new connections every time and if there's a way around that.... I'll look into this asap.

@bakerkretzmar Thanks a lot! Yes, it happens after a few tests. I also had the same thoughts and I've tracked it down to this line https://github.com/laravel/framework/blob/8.x/src/Illuminate/Database/Connection.php#L1038

Tests work as expected when I register the custom DBAL type using DB::registerDoctrineType() in the AppServiceProvider's register method.

@skollro can you show me exactly how you're doing this? It fails both ways for me.
I think the line you referenced is causing the tests to create two database connections when they only need one, but I'm not sure why that matters. Laravel is already creating connections and that doesn't cause any issues, so maybe they're getting cleaned up somehow and Doctrine's aren't?

This change broke our tests when we upgraded to 8.78.1
We had dbal array in our config/database.php Removing that and adding a DB::registerDoctrineType() in AppServiceProvider instead fixed it.
So this seems like a breaking change.

@canvural Before rearranging your Laravel project did you increase your packet size?
max_allowed_packet=200M

@canvural Before rearranging your Laravel project did you increase your packet size?
max_allowed_packet=200M

Why would I? It's working fine with 8.77

Why would I? It's working fine with 8.77

I ask because the error was a MySQL error.  However, I don't want to discount your report to just be the fault of another service.  Can you provide a unit test that replicates the issue you've reported?  I'm afraid that without a test to duplicate it we're going to be at a loss.

@canvural are you running tests in parallel? If so, do you still see those errors when you run them 'normally' (not in parallel)?

@canvural are you running tests in parallel? If so, do you still see those errors when you run them 'normally' (not in parallel)?

No, I don't run parallel.

@bakerkretzmar You're right, I've recreated the issue in a fresh Laravel project, using a PostgreSQL database. Calling DB::registerDoctrineType() in the AppServiceProvider only works for sequential test runners. Not even the test databases are created when parallel testing is used. Maybe @nunomaduro could have a look to help us here?

Also adding DB::registerDoctrineType call to a service provider causes Laravel to make db connections at boot. I'm trying to avoid doing any db calls in any service provider.
An application should be bootable even if there is no db connection or it has wrong configuration.

I created an example repo: https://github.com/canvural/doctrine-type-bug
In the master branch there is just the dbal array in config/database.php And when running tests it fails.
In fixed branch I removed the dbal array and instead added DB::registerDoctrineType to AppServiceProvider and it works.

authors: TomHAnderson bakerkretzmar canvural skollro tpetry


text:
[9.x] Fix callOnce seeder method to properly process arrays

Update the callOnce method in Seeder.php to correctly handle an array of seeder classes being supplied.
@sebastiandedeyne I'm assuming this was the intent of the original based on the doc block for the $class parameter (string|array) and your examples in your post about callOnce being added.

I am closing this pull request because it lacks sufficient explanation, tests, or both. It is difficult for us to merge pull requests without these things because the change may introduce breaking changes to the framework.
Feel free to re-submit your change with a thorough explanation of the feature and tests - integration tests are preferred over unit tests. Please include it's benefit to end users; the reasons it does not break any existing features; how it makes building web applications easier, etc.
Thanks!

Fair enough.  I assumed the change was straight forward enough to not need a lot of explanation.  I'll come back to this when I have time and see if I can flesh something out.  The original inclusion of callOnce didn't include tests, which probably would have caught this before it was included.
Appreciate the time in any case.

authors: taylorotwell wreality


text:
[9.x] Add new $eloquentBuilder model property to override Eloquent builder

This PR adds a new $eloquentBuilder property to the Illuminate\Database\Eloquent\Model class to easily override the Eloquent query Builder.
For more context about these custom eloquent builders, Tim MacDonald wrote a great article about it.
Why?
In order to use a custom Eloquent Builder, you'll have to override the newEloquentBuilder() method from the abstract Model class.
In this method you'll need to add the Builder $query argument and then return your custom Builder class:
use Illuminate\Database\Eloquent\Model;
use App\Builders\UserBuilder;

class User extends Model
{
    public function newEloquentBuilder($query)
    {
        return new UserBuilder($query);
    }
}

Since you only have to return your custom Builder class and nothing more, this can be simplified in my opinion.
I thought it would be nice if you can override this newEloquentBuilder() method by just setting a $eloquentBuilder property which accepts a custom Builder class:
use Illuminate\Database\Eloquent\Model;
use App\Builders\UserBuilder;

class User extends Model
{
    protected $eloquentBuilder = UserBuilder::class;
}

use Illuminate\Database\Eloquent\Builder;

class UserBuilder extends Builder
{
    //
}

To avoid conflicts or confusion about what the property does, i've called it $eloquentBuilder and not something like $builder, but suggestions are welcome.

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.

authors: denniseilander taylorotwell


text:
[9.x] Remove incorrect static modifier

The methods documented on Illuminate\Support\DateFactory are all documented as static, but none of them can actually be called statically.
E.g.:
>>> Illuminate\Support\DateFactory::now()
PHP Error:  Call to undefined method Illuminate\Support\DateFactory::now() in eval'd code on line 1

Since the date factory implements a __call() method, these methods can be called on an instance of a date factory
>>> app('Illuminate\Support\DateFactory')->now()
=> Illuminate\Support\Carbon @1659805915 {#5253
     date: 2022-08-06 19:11:55.339460 Europe/Amsterdam (+02:00),
   }

Failing tests seem unrelated, this PR contains no code changes

@axlon restarted that for you

authors: axlon driesvints


text:
check event listeners for shouldQueue{trait} methods

I found in my project I was duplicating code to determine whether the listener shouldQueue. I started looking into adding this duplicated code to traits and thought this might be a useful dx feature. Essentially I am copying this livewire functionality https://laravel-livewire.com/docs/2.x/traits but for event listeners
class DoThingListener implements ShouldQueue {
    use MyCondition;

    public function shouldQueue($event) {
        // my specific condition
    }
}

trait MyCondition {
    public function shouldQueueMyCondition($event) {
        // my trait condition
    }
}

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.

authors: coleshirley taylorotwell


text:
[10.x] Add increment to Str helper

This PR adds  increment to Str helper.

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.


text:
[11.x] Pass app instance into application builder callbacks

This PR adds passing of app instance into middleware, schedule and exceptions building callbacks of ApplicationBuilder.
This allows simple logic based on application state, e.g.:
->withSchedule(function (Schedule $schedule, Application $app) {
    if ($app->isProduction()) {
        $schedule->command('only-in-production')->daily();
    }
})

@taylorotwell as alternative, we can bind $this->app to all these closures and use like that:
->withSchedule(function (Schedule $schedule) {
    if ($this->isProduction()) {
        $schedule->command('only-in-production')->daily();
    }
})


text:
Can't install on Laravel v5.4.27

I'm trying to install this package through
composer require laravel/legacy-encrypter

but I run into a
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for laravel/legacy-encrypter ^1.0 -> satisfiable by laravel/legacy-encrypter[v1.0.0].
    - Conclusion: remove laravel/framework v5.4.27
    - Conclusion: don't install laravel/framework v5.4.27
    - laravel/legacy-encrypter v1.0.0 requires illuminate/support 5.3.* -> satisfiable by illuminate/support[v5.3.0, v5.3.16, v5.3.23, v5.3.4].
    - don't install illuminate/support v5.3.0|don't install laravel/framework v5.4.27
    - don't install illuminate/support v5.3.16|don't install laravel/framework v5.4.27
    - don't install illuminate/support v5.3.23|don't install laravel/framework v5.4.27
    - don't install illuminate/support v5.3.4|don't install laravel/framework v5.4.27
    - Installation request for laravel/framework (locked at v5.4.27, required as 5.4.*) -> satisfiable by laravel/framework[v5.4.27].

Installation failed, reverting ./composer.json to its original content.

I suppose this means that this package is not compatible with Laravel 5.4? Although it says in the description:

It is primarily intended to be used to migrate your data to the new OpenSSL based encrypter used in 5.1 through the latest release of Laravel.

I got around this by downloading the package instead of requiring it through the command line.
If you place the contents in your project folder under "/packages/laravel/legacy-encrypter/" then require it as a local repository in your composer.json:
"repositories": [
        {
            "type": "path",
            "url": "packages/laravel/legacy-encrypter/"
        }
    ]

You should be able to install the package this way without conflicts. You will need to update the encrypt and decrypt functions of the McryptEncrypter class to match the new format of Illuminate\Contract\Encryption\Encrypter. Simply add $serialize = true and $unserialize = true to the encrypt and decrypt function arguments respectively.

authors: michaeldzjap stuartcusackie

repo: laravel/legacy-encrypter


text:
Ability to specify format of the output

PHP-CS-Fixer has the option to configure the output format  with --format (https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/doc/usage.rst#the-fix-command)
txt (default one), json, xml, checkstyle, junit and gitlab
currently i dont see an option to specify which output format to use which would be good to have in for example gitlab CI

At this time, we don't have plans for other formatters.

That damages utility for CI/CD tools - being able to format (e.g. as junit) allows CI tools to detect and report actual faults in a useful manner.
I'm happy to have a dig around and see what can be done to pass this flag through to php-cs-fixer and send a PR, but I won't bother if you're not wanting to support that passthrough.

It really depends of the amount of code we are talking about. Don't hesitate on making a POC so we can have an idea first/

authors: henrik9999 nunomaduro samlev

repo: laravel/pint


text:
not work without php artisan serve

Pulse Version
v1.2.5
Laravel Version
11.22.0
PHP Version
8.3.6
Livewire Version
3.5.6
Database Driver & Version
MySql
Description
When i use php artisan serve everything is okay.
but in production i use apache and project run without artisan command
and this make some error at livewire/update route :(

Steps To Reproduce
I just setup everything like laravel docs
https://laravel.com/docs/11.x/pulse

Hi there,
Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord or InertiaJS Discord for Inertia questions
Larachat
IRC

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.

Looks like your path has a funny offset, your path probably shouldn't include /public as it looks like you'll have directory traversal issues. I would fix that so your path is /pulse and then it should start working.

authors: driesvints omidmousavi shealavington

repo: laravel/pulse


text:
Consider decoupling source code into modules

The package hierarchy is getting pretty insane. I think it may look a lot nicer and easier to navigate if it's split up into different modules.

3 or 4 modules would do nicely. Maybe: luna-main, luna-game, luna-net, luna-utils

Honestly, I find projects that do that more confusing to try and work on. Mostly because it is done unnecessarily. Having a large package structure is not a bad things as long as it is organized. We have projects at work with hundreds of packages in a single project.


text:
Drop python 2.7 support?

Since python 2.7 will no longer be receiving updates starting from 1st January 2020 i think it would be a good idea to drop support for python 2.7 in this package, so that force users to use recent and updated versions of python.
I know it would lose backward compatibility, but nevertheless in my opinion it is a good idea.

Drop support is just stop writing new code compatible with both Python 2 and 3. But it can also mean code refactoring by removing Python 2 support code.
I do not see any requirements to drop Python 3, unless we would like to use some nice fancy feature of Python 3. However, the nice features of Python 3 are on the higher versions as Python 3.7, which would mean to also drop support to Python 3.3, 3.4, etc.
I still use ancient systems which will be using Python 2.7 for a long time after 2020 as until 2030. So, I would like to keep the python 2.7 support.

Ok, no problem, just a suggestion :)

There is not need to close. One day Python 2 support will be dropped and this is our reminder 😄

However, the nice features of Python 3 are on the higher versions as Python 3.7, which would mean to also drop support to Python 3.3, 3.4, etc.

Python 3.3 and 3.4 are also EOL, so can be dropped too.
Here's the pip installs for lark-parser from PyPI for October 2019:

category
percent
downloads

3.6
38.98%
39,390

3.7
35.29%
35,666

2.7
19.85%
20,060

3.5
3.64%
3,678

null
1.09%
1,104

3.8
0.81%
816

3.4
0.23%
235

2.6
0.11%
114

3.9
0.00%
1

Total

101,064

Source: pip install -U pypistats && pypistats python_minor lark-parser --last-month
Many other projects are also committed to dropping Python 2 support in or before 2020, see https://python3statement.org.
Dropping support for something doesn't mean the package goes away: people can still install the last version that supported the old one. It just means they won't get any new (security) updates -- just like the Python 2 interpreter itself!
Adding python_requires to setup.py helps pip install the right version.

According to your chart, Python 2.7 is 20% of our users. That's nothing to scoff at.
The hardest part about making Lark work for both Python 2 & 3, was figuring out unicode in the shade of regexps. But that's all figured out. The only benefit I can think of, from dropping Python 2, would be to use raise from and yield from. But it doesn't seem like it's worth it.

Traditionally, as far as I know, pypi download stats have to be taken with a grain of salt, since downloads by CI servers are included, which can heavily distort the stats. I don't know if this is the case with this tool or the relatively recent overhaul of pypi itself.

Unless anyone has new information, I'm closing this issue

authors: bilderbuchi erezsh evandrocoan hugovk llpinokio

repo: lark-parser/lark


text:
Error while uninstalling TABL

Install repo https://github.com/larshp/todo_logic, add some data to the database table.
Uninstall, then it shows the following error, expected result is that all objects are deleted,

fixed in https://github.com/larshp/abapGit/issues/698

repo: larshp/abapGit


text:
Issue 3324: WDA Texts are not taken into account

The WDA texts of the text based entities like labels, buttons, TextView,... have not been included in the ZIP-archive. They are stored as SOTR object and have been added to the github artifacts.

@larshp Would it be possible to create the repo https://github.com/abapGit-tests/SOTR to move the WDYN tests there?

@jfilak I've invited you to the abapGit-tests organization, you should then have access to create repositories there

@larshp  Thanks! I've created the repo https://github.com/abapGit-tests/WDYN because the SOTR class is not an object type handler but a helper class.
@KDS42 We need to move the src/test/zwd_abapgit_test_sotr.wdyn.xml to the new repo. Basically, fork it, create a package $wdyn, clone your fork to your system, move the object to the new package, commit and open a new PR.

@jfilak 👍

@Community: can someone check the scenario? E.G. Export your local WD component (including WD application) OFFLINE from system A.  Afterwards importing ARCHIVE into system B, where the component does not exist - are Labels, Texts correctly displayed at Runtime?

Hi,
after pull of the example repo I get the following diff, need to sort the elements,

Also no SOTR after pull,

I tested again - it worked - please see attachment for the steps:
WDA_SOTR_GITHUB.docx

I think the sorting issue was existing before this PR, so it can be moved to a separate issue

anyhow, lets just go for it 🚢

and thanks 👍 welcome to abapGit as a contributor

authors: KDS42 jfilak larshp


text:
WPS

https://wps-workplace-solutions.jobs.personio.de/job/630268?display=de
personal@wps.de
Beworben am 29.08.23
Gespräch mit Guido am 01.09.23

12.09.23: Von mir abgesagt


text:
Feature/4 fetch and display event data

updated eventlist

this branch is already merged to dev branch, if you want to modify something, create a new one then work on it.

repo: lassijjk/TurnUp


text:
{ in curly group gets interpreted as math mode, breaks ENTIRE document

Hi everyone,
I installed your parser in neovim with the treesitter extension.
I'm using this plugin to select my colorschemes: https://github.com/NvChad/base46
So I have this code in my latex document to define a listing highlighting for json.
\lstdefinelanguage{json}{
	literate=
	*{0}{{{\color{numb}0}}}{1}
	{1}{{{\color{numb}1}}}{1}
	{2}{{{\color{numb}2}}}{1}
	{3}{{{\color{numb}3}}}{1}
	{4}{{{\color{numb}4}}}{1}
	{5}{{{\color{numb}5}}}{1}
	{6}{{{\color{numb}6}}}{1}
	{7}{{{\color{numb}7}}}{1}
	{8}{{{\color{numb}8}}}{1}
	{9}{{{\color{numb}9}}}{1}
	{:}{{{\color{punct}{:}}}}{1}
	{,}{{{\color{punct}{,}}}}{1}
	{\{}{{{\color{delim}{\{}}}}{1}
	{\}}{{{\color{delim}{\}}}}}{1}
	{[}{{{\color{delim}{[}}}}{1}
	{]}{{{\color{delim}{]}}}}{1},
}

Especially have a look at the line
	{\{}{{{\color{delim}{\{}}}}{1}

This line breaks the highlighting for the ENTIRE Document. All other lines in the example get interpreted as curly_group, while this one gets interpreted as math_set.
It has several errors and causes every following text to be interpreted as part of this math_set . This breaks the entire highlighting.
Deleting this line, solves the issue.
As a bonus, you can see another error in the video in the line:
\definecolor{delim}{RGB}{20,105,176}

But this is not a problem for the rendering
Video:
https://user-images.githubusercontent.com/35628420/168420422-00eb5a12-48d4-4071-b5f6-48b428023724.mp4
I'm wondering, other colorschemes with Treesitter Integration, like https://github.com/Mofiqul/dracula.nvim seem to handle this better and don't completely break. Could you guess a reason for this?
This is the TreeSitter integration of my colorschemes: https://github.com/NvChad/base46/blob/master/lua/integrations/treesitter.lua
This is the one of dracula.nvim: https://github.com/Mofiqul/dracula.nvim/blob/a219971291c56bcca3827cb7bd40aaaef23feeca/lua/dracula/init.lua#L180

Thanks for the detailed report!

\definecolor{delim}{RGB}{20,105,176}

This error should be fixed now (8ac966ece55fc9696eab53e223499c7d687052bc).

{{}{{{\color{delim}{{}}}}{1}

I think there is no good way to keep the math_set rule and fix this error. Besides, the math_set rule is not really a syntactic element of LaTeX so I removed it (23463ca6b867e8089d3b680ad720dc8fd26af34e). For example, $ \} $ is not forbidden by LaTeX.

That was quick!
Thank you so much, this really did help a lot!
Unless you desire to do something else in this, you can close it :)

authors: pfoerster primeapple

repo: latex-lsp/tree-sitter-latex


text:
docker image of arethusa local dev

we should create a docker image of a local arethusa dev environment and share it on docker hub to make it easier for people to try it out.

That's a pretty cool idea!

@zfletch implemented this in #782

authors: LFDM balmas

repo: latin-language-toolkit/arethusa


text:
Support for Vitest test runner

I see this library is very specific to jest, do you plan on supporting Vitest?
I guess one could either have a new lib vitest-launchdarkly-mock or a more generic one, wdyt?

btw, the API looks really similar, we are planning to migrate to Vitest and I ported over this lib to our monorepo, I installed all the lodash dependencies plus launchdarkly-js-client-sdk and essentially renamed everything jest. to vi. and it works, but ideally we would use this lib

Hello @vcapretz, thank you for the question, and sorry for the late reply. Currently, there is no plan for supporting Vitest. If there is a way to refactor to a more generic one to support multiple testing frameworks, that would be nice.

Hello @vcapretz, as a follow-up, while there is no ETA yet, I have discussed with the JS engineer on this, it would be good to eventually support vitest as a separate package. I will mark this as an enhancement and track this internally.
Filed internally as 207468.

@vcapretz @louis-launchdarkly
I hope this helps https://github.com/bohdanbirdie/vitest-launchdarkly-mock
I'm planning to use this for my needs, feel free to suggest changes

repo: launchdarkly/jest-launchdarkly-mock


text:
Prevent resetMocks: true from clearing mock implementations

Requirements

[x] I have added test coverage for new or changed functionality
[x] I have followed the repository's pull request submission guidelines
[ ] I have validated my changes against all supported platform versions

Describe the solution you've provided
If a team uses resetMocks: true in their jest config then the mocked functions of launchdarkly-react-client-sdk will return undefined during test execution.
To allow teams using resetMocks to use this package I have pulled the mock implementations into a setupMocks function that can be called in beforeEach.
I haven't updated the documentation to explain this usecase, I'd value feedback on where / how to do that.

Thank you for submitting this PR. We will review and provide an update soon.

authors: michaeldfallen yusinto


text:
Adding examples of actions, including RJSF examples for different set of types

ui schemas are placed, but not working
I actually have copied all actions from https://github.com/launchrctl/launchr/tree/main/example
And also added several RJSF actions with various set of types with some long test docker command execution

Probably we don't need DockerFiles and main.sh here.
@davidferlay
@lexbritvin
Could you please check?

Other looks good to me.

Probably we don't need DockerFiles and main.sh here.

Depends if you need actions to work successfully or not
If not, only actions/*/action.yaml is needed

Let's merge then. we can manage it later.

repo: launchrctl/web


text:
qq第三方登录粗略完成！

good job！

ok


text:
Filters:ColorFilter seems not to work on Laya Skeleton 2D Node

Filters:ColorFilter seems not to work on Laya Skeleton 2D Node.
(GlowFilter and BlurFilter work)

Laya Skeleton does not support the filter feature. If you want to use filters on skeletal animations, it is recommended to use Spine skeletal animations along with the filter functionality.

Filters:ColorFilter seems not to work on Laya Skeleton 2D Node.
(GlowFilter and BlurFilter work)

Laya Skeleton does not support the filter feature. If you want to use filters on skeletal animations, it is recommended to use Spine skeletal animations along with the filter functionality.

I see.

authors: LayaCharley Lykdraft

repo: layabox/LayaAir


text:
hasListener 应判断 _events[type] 数组内容是否有效

off 时，_events[type] 数组中的元素会被置空，但是不会立刻回收数组，有可能 off 过后数组已经不含任何 handler 了...

确实是这样，不过有问题，还望说详细一些

authors: jareguo yungzhu

repo: layabox/layaair


text:
[Performance] CLI-based SMPS Import

Current Behavior
Users may use REST API with curl to import and run performance tests in Meshery.
Desired Behavior
User loads SMPS-compatible document and test is immediately executed. See Meshery Performance Management

Included in the v0.4.0 release.


text:
希望增加top.layer.open()弹窗子、父窗口传参、函数回调的支持

议题条件

[X] 我确认已查看官方使用文档：https://layui.dev ，但没有找到相关解决方案。
[X] 我确认已在 Issues 中搜索过类似的问题，但没有找到相关解决方案。
[X] 我已仔细阅读： 🍀 Layui Issue 贡献指南

议题类型
功能请求
使用版本
v2.9.6
问题描述
经常会使用top.layer.open()将弹窗置顶显示，带来的问题就是子、父窗口之间传参、函数回调、跨域访问等较layer.open()麻烦太多，需要“变道超车”，费时费力，能否对top.layer.open()功能做一定加强，使之与常规的layer.open()相比，除了置顶功能不同外，其它的都一样？？或是能否对layer.open()增加窗口置顶显示函数？
业务代码
无

截图补充
No response
浏览器
Microsoft Edge 版本 121.0.2277.83 (正式版本) (64 位)
演示地址
No response
友好承诺

[X] 我承诺将本着相互尊重、理解和友善的态度进行交流，共同维护 Layui 良好的社区氛围。

iframe 之间的通信建议自行封装或者使用 https://github.com/braintree/framebus

authors: Sight-wcg artisancn

repo: layui/layui


text:
Add delta producer for worship posts

To be consumed by app-worship-organizations to get the worship posts and their links to organen and eenheden

Looks good!
I just made some conflicting changes as well in a different branch.
I propose to first merge this, I'll make the necessary changes for https://github.com/lblod/app-organization-portal/pull/210 afterwards

authors: bdevloed claire-lovisa

repo: lblod/app-organization-portal


text:
Bug/scoped validations

@Asergey91 opening a PR already

current issues,

multiple generated subforms fail validation
deleted subforms cause false positives
after pulling everything on frontend and form-fields, yesterday. when emptying the rdfa editor fields, the input of those fields doesnt get update

running the setup as it is right now, replace the paths with the respective paths on your system: cd ../ember-submission-form-fields/; rm -rf node_modules/@lblod/submission-form-helpers/; cd ../submission-form-helpers/; npm run prepare; cd ../ember-submission-form-fields/; npm link @lblod/submission-form-helpers --save --install-links; cd ../frontend-loket/; ember serve --proxy http://localhost:90;

Superseded by #46

authors: Asergey91 Windvis cecemel

repo: lblod/submission-form-helpers


text:
Patch app side balance checking for publishing/claiming channel

The Issue
In https://github.com/lbryio/lbry-app/pull/794, we did some patching on the app side to account for a hold-up on a daemon issue(https://github.com/lbryio/lbry/issues/855), but there are a few scenarios that weren't taken into account. Two are logged here on the daemon side: https://github.com/lbryio/lbry/issues/1107 because the result is confusing.  This also expands upon https://github.com/lbryio/lbry-app/issues/874
These are the three scenarios

Creating a channel with a bid amount that's exactly equal to your wallet balance > channel is created even though the bid fails
Publishing with a bid amount that's exactly equal to your wallet balance > object error in  https://github.com/lbryio/lbry-app/issues/874
Creating a channel/publish for a tiny amount (0.000000001 is what some user tried and I confirmed it breaks too)
Publishing with a 0 LBC bid > object error in  https://github.com/lbryio/lbry-app/issues/874

In the first and 2nd scenarios, the app allows the channel to be selected even though it's not created successfully according to the daemon. This causes additional confusion because you run into https://github.com/lbryio/lbry-app/issues/874 when trying to publish with the channel.
For the scenario where wallet balance = claim amount, we should warn that they cannot use their entire balance and ask them to try a smaller amount. Not sure how to handle this better before https://github.com/lbryio/lbry/issues/1045 is implemented.
System Configuration

LBRY Daemon version:
LBRY App version:
LBRY Installation ID:
Operating system:

Anything Else

Screenshots

@kauffj/@liam do we want to prioritize additional app side patching while the protocol's shortcomings are worked through? This is the main cause of that [object object] message which surfaces in the scenarios described above which we have seen quite often.

Closing this, the UX has improved but final enhancements will be added when the daemon can provide fee estimates.

repo: lbryio/lbry-app


text:
Style for labels in the channel description

PR Checklist

Please check all that apply to this PR using "x":

[x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
[x] I have checked that this PR does not introduce a breaking change
[x] This PR introduces breaking changes and I have provided a detailed explanation below

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[x] Code style update (formatting)
[ ] Refactoring (no functional changes)
[ ] Documentation changes
[ ] Other - Please describe:

Other information
This first layer of styles can give a better integration in the information. I'm trying some sub-tab alternatives to compress the description. If I have missed something important in terms of code, please comment how I can improve it so that it is better optimized.
PS: I had accidentally deleted a file which was restored. :)

Thanks for the PR @michaelmitnick
I'm going to close this as it doesn't align with the app's current style.

authors: michaelmitnick seanyesmunt

repo: lbryio/lbry-desktop


text:
Mass abandoning supports / support create times out

When trying to abandon a support (for example this one with 1634 transactions), the SDK fails:
1d/1z [lbry@ytsync4:~] 1m18s 148 $ /opt/lbry/lbrynet support abandon --blocking --claim_id=173078c44b5b7ec794f8bf4a341c7b5a346b6a8e
Traceback (most recent call last):
  File "lbry/extras/cli.py", line 317, in <module>
  File "lbry/extras/cli.py", line 307, in main
  File "asyncio/base_events.py", line 573, in run_until_complete
  File "lbry/extras/cli.py", line 32, in execute_command
  File "site-packages/aiohttp/client.py", line 1005, in __aenter__
  File "site-packages/aiohttp/client.py", line 497, in _request
  File "site-packages/aiohttp/client_reqrep.py", line 857, in start
  File "site-packages/aiohttp/helpers.py", line 585, in __exit__
concurrent.futures._base.TimeoutError
[2660] Failed to execute script cli

this also never returns to the JSON RPC, which means that if the call is invoked over HTTP, the client will remain hanging until the timeout is reached.

Users and youtube sync also have the same problem with support create. This generally happens on larger wallets/transactions.

repo: lbryio/lbry-sdk


text:
added swap space

added swap space
based on their tweet recently

Please rebase on master - no need to re-remove them.

@tzarebczan i use github mobile. so far with my computer sir

Thanks @ykris45 !


text:
Fix Future.get() blocking main thread

PR Checklist

Please check all that apply to this PR using "x":

[x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
[x] I have checked that this PR does not introduce a breaking change

PR Type
What kind of change does this PR introduce?

[x] Refactoring (no functional changes)

What is the current behavior?
Main thread -the rendering one- is blocked when Future.get() is called until a result is given by the Callable
What is the new behavior?
This PR will use CompletableFuture on Android 7 and above and a slightly modified version of current one so main thread is no longer blocked.

I have mostly done the same on second and third commit. Requesting review just in case.

repo: lbryio/odysee-android


text:
Unable to execute lcui create myapp

Describe the bug
After installing @lcui /cli by cnpm, unable to execute lcui create myapp
To Reproduce
Steps to reproduce the behavior:

sudo cnpm install -g @lcui/cli
lcui create myapp
After my check, I modify the "/usr/local/bin/lcui" attribute from CRLF to LF, then work fine. I think this is the key.

Screenshots

Environment (please complete the following information):

OS and version: Ubuntu 20.04

这个命令暂时只适用于 Windows 系统。

Describe the bug
After installing @lcui /cli by cnpm, unable to execute lcui create myapp
To Reproduce
Steps to reproduce the behavior:
1. sudo cnpm install -g @lcui/cli

2. lcui create myapp
   After my check, I modify the "/usr/local/bin/lcui" attribute from CRLF to LF, then work fine. I think this is the key.

Screenshots

Environment (please complete the following information):
* OS and version: Ubuntu 20.04

用 npm -g 就可以

repo: lc-soft/LCUI


text:
Clone works

Added works cloning per Sally's request.
Added better looking messaging.
Change all references to the "cloned from" record.  In works records, there are triples objects that point to itself, so the clone function changes triples objects as well as subects were appropriate.
Preserve the hash part of a URI (ie.  #100-10.)
Added a modal with an input box to enter a custom (not machine minted) resource ID.  (I think this is what C.3.2.5 is hinting at.)

I think we can close out 3.2.4 and 3.2.5, but I'm not sure.  Please review the changes and merge with development.
--Charles

It works but the clone button only should appear at the top level, not in any modal windows.
We should use automatically change the uri w/o a modal window.  Changing the uri should be a button next to clone.
So we should merge this pull reuqest and create a new branch to fix these problems?

authors: cledvina kirkhess

repo: lcnetdev/bfe


text:
Documentation shows false implementation

Hello There i just got started with ldapjs and there doesn't seem to be a fine example of how to use starttls
https://github.com/ldapjs/node-ldapjs/blob/master/docs/client.md#starttls
Doc says usage is starttls(options, controls, callback)
But example says
const opts = {
  ca: [fs.readFileSync('mycacert.pem')]
};

client.starttls(opts, (err, res) => {
  assert.ifError(err);

  // Client communication now TLS protected
});

But doesnt seem to be an optional param:
Client.prototype.starttls = function starttls (options, controls, callback, _bypass) {
  //...
}

how do i properly create tls upgrade with the starttls method? or better how do i create/use the control?

The control is added by the starttls method:
https://github.com/ldapjs/node-ldapjs/blob/9143456b4fa2e07127fb1fd37677fdfd4c73a6c5/lib/client/client.js#L744-L748

👋
On February 22, 2023, we released version 3 of this library. As a result, we are closing this issue/pull request.
Please see issue #839 for more information, including how to proceed if you feel this closure is in error.

authors: OrbiterToad jsumners

repo: ldapjs/node-ldapjs


text:
🛑 Thonk Website is down

In 44c07fe, Thonk Website (https://www.thonk.xyz) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Thonk Website is back up in b120886.

repo: le-server/thonk-upptime


text:
addLine 和 addNode 在 lock 时的行为不一致？

我现在有个需求， 轮询后台根据拓扑关系更新画布。
目前算法是先删除所有节点， 再用 addNode, addLine 一个个加上去。发现一个奇怪的地方，
即画布锁定时，对节点没影响， 对线却直接返回了， 为什么要这样设计呢？
感觉作为用户， 画布锁定时， 他们的行为一致更符合直觉。
  addLine(line: any, focus = false) {
    if (this.data.locked) {
      return null;
    }
   // 省略部分
 }
  addNode(node: Node | any, focus = false) {
    if (!drawNodeFns[node.name]) {
      return null;
    }
   // 省略部分
}

fixed


text:
[Feature Requests] Multi-architecture support

Looks like amd64 only with docker image.
Hope to add arm support

Added linux/arm/v7 and linux/arm64 in v0.1.3

authors: leafduo sakuyamaij

repo: leafduo/chatgpt-telegram-bot


text:
请求http://localhost:8080/service/test_service/hello?name=zhh报错500，Class "org.lealone.examples.spring.executor.TestServiceExecutor" not found

使用官方例子自己在写了一个
`public class TestService {
// 用这样的url打开: http://localhost:8080/service/hello_service/hello?name=zhh
public String hello(String name) {
return "Hello " + name;
}
public static void create() {
    try {
        Connection conn = DriverManager.getConnection("jdbc:lealone:embed:lealone", "root", "");
        String sql = "create service if not exists test_service (hell(name varchar) varchar)" //
                + " implement by '" + TestService.class.getName() + "'";
        conn.createStatement().executeUpdate(sql);
        conn.close();
    } catch (SQLException e) {
        e.printStackTrace();
    }
}

}`
在 ServletInitializer和SpringDemo加上了TestService.create();

已经不使用org.lealone.examples.spring.executor.TestServiceExecutor的方式调用服务了，这个类是动态生成的，spring boot 不支持 java compiler 动态编译，所以我几个小时前才修改了实现。还没有把最新 jar 包部署到 maven 仓库。
你需要下载 lealone 和 lealone-plugins 这两个项目的代码，然后把它们安装到本地的 maven 仓库，这样就能用到最新的版本了。

已经不使用org.lealone.examples.spring.executor.TestServiceExecutor的方式调用服务了，这个类是动态生成的，spring boot 不支持 java compiler 动态编译，所以我几个小时前才修改了实现。还没有把最新 jar 包部署到 maven 仓库。
你需要下载 lealone 和 lealone-plugins 这两个项目的代码，然后把它们安装到本地的 maven 仓库，这样就能用到最新的版本了。

Maven Central Repository 今天有问题，新 jar 包部署都失败了，你只能下载源代码然后用 mvn install -Dmaven.test.skip=true 安装到本地的 maven 仓库了。

好的，如果可以在补充一些命令和铺垫理论知识那最好了，来完善Lealone官方文档会更加快速上手这个框架开发。比如：mvn clean install -Dmaven.test.skip=true -U让项目打包的文件自动打包到idea默认设置的仓库目录，今天没注意导致用了不少的时间终于跑起来了。
------------------ 原始邮件 ------------------
发件人: @.>;
发送时间: 2022年10月22日(星期六) 中午12:48
收件人: @.>;
抄送: @.>; @.>;
主题: Re: [lealone/Lealone-Examples] 请求http://localhost:8080/service/test_service/hello?name=zhh报错500，Class "org.lealone.examples.spring.executor.TestServiceExecutor" not found (Issue #19)
已经不使用org.lealone.examples.spring.executor.TestServiceExecutor的方式调用服务了，这个类是动态生成的，spring boot 不支持 java compiler 动态编译，所以我几个小时前才修改了实现。还没有把最新 jar 包部署到 maven 仓库。
你需要下载 lealone 和 lealone-plugins 这两个项目的代码，然后把它们安装到本地的 maven 仓库，这样就能用到最新的版本了。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

lealone 是一个标准的 maven 项目，你最好独自下载一个 maven 到你的本机上，然后把它的 bin 目录加到 path 环境变量里，最后再依据你使用的具体操作系统修改一下它的 settings.xml 文件把里面的仓库目录设置一下就可以啦。
idea 和 eclipse 都能自动识别你本机上面的 maven  的，每个人都有自己喜欢的 ide，一个开源项目不可能只是为某个 ide 设计，只要是一个标准的 maven 项目即可，然后各个 ide 就能统一的识别 maven 项目了。配置好了 maven 之后，使用标准的 mvn install 命令就能把 jar 包安装到前面配置好的仓库目录，然后所有 ide 都能找到 maven 打包后的 jar 包了。
maven 是 java 开发的基础知识了，如果一个项目带有 pom.xml，那它就是 maven 项目，每遇到一个 maven 项目，别人一般都不会从头写文档介绍怎么使用 maven 的，这个需要你自己去找 maven 的文档来看。

authors: codefollower zoujiegogogo

repo: lealone/Lealone-Examples


text:
feat: allow configuring additional linters to run

Extend getChecks to allow an additional list of linters, which is always run. This can be used downstream to e.g. enable the docBlameThm or explicitVarsOfIff linters without modifying batteries.
As part of this, we

update fix the function docstring (which was quite outdated anyway)
remove the useOnly option: the equivalent effect can be achieved by filtering the list of linters afterwards; adding linters cannot, hence must be performed in this function. (That said, I'm happy to add this functionality back if desired.)
rename a variable dflt to the more readable default
adjust the logic of the #lint command accordingly
Note that test/lint_simpNF.lean lies on this (the docBlame linter warns there) - so this changed is already tested.

awaiting-review

I just pushed a commit adding back the useOnly option as runOnly.

repo: leanprover-community/batteries


text:
refactor(SetTheory/Ordinal/Basic): type_lt → type_toType

The new name is much more discoverable and makes clear that this isn't just any < relation.

maintainer merge

bors merge

authors: YaelDillies fpvandoorn vihdzp


text:
doc: add docstring for StarOrderedRing ℝ

bors r+

Let's try this again:
bors r+


text:
chore(FieldTheory/Finite): golf

Motivated by @Ruben-VandeVelde's leanprover-community/mathlib#15206

Thanks!
bors merge

authors: riccardobrasca urkud


text:
meta.yaml question: Can I add a doi and gh repo url?

I am a bit confused as how to properly format the meta.yaml to capture all the information in how to cite this product.
For this recipe I would like to link the gh page: https://github.com/google-research/arco-era5 and the recommended citation (https://ams.confex.com/ams/103ANNUAL/meetingapp.cgi/Paper/415842).
The citation does not seem to have a doi. Where is a full list of possible fields for meta.yaml?

I am a bit confused as how to properly format the meta.yaml to capture all the information in how to cite this product.

you can add a links section to the catalog.yaml
links:
  - label: DOI
    url: https://10.0.0.x.......
  - label: my link
     url: .....

would this work for you?

Where is a full list of possible fields for meta.yaml?

not 💯 sure if you meant meta.yaml or catalog.yaml. the meta.yaml is a Pangeo-forge specific file. we extend it only through the catalog.yaml, which has documentation available here

I was thinking of the meta.yaml. And I guess it is more a question towards pangeo-forge (there are some old discussions here).
It seems like @norlandrhagen did already add some info though, so I think we can close this for now.


text:
Now lets get that action working

Follow up on #13

Added some checks to the script

Does the data store actually exist?
Option to either specify the full store path within each recipe_id item (for 'external' stores), or give the prefix and the path will be constructed from the prefix and recipe id.

This works, wohooo